Repository navigation
PostgreSQL: Parse a grantee after PUBLIC in GRANT and REVOKE - #2741
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2741 +/- ##
=======================================
Coverage 82.44% 82.44%
=======================================
Files 42 42
Lines 35424 35426 +2
Branches 35424 35426 +2
=======================================
+ Hits 29205 29208 +3
Misses 2682 2682
+ Partials 3537 3536 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LucaCappelletti94
force-pushed
the
upstream/public-grantee-list
branch
from
October 28, 2026 11:29
b410346 to
b11a944
Compare
LucaCappelletti94
force-pushed
the
upstream/public-grantee-list
branch
from
October 28, 2026 21:36
b11a944 to
46ba0ca
Compare
alamb
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GRANT SELECT ON t TO PUBLIC, readerandREVOKE EXECUTE ON FUNCTION f() FROM PUBLIC, anonfailed to parse withExpected: end of statement, found: reader, while the same lists withPUBLIClast parsed. PostgreSQL's grantee list is a comma-separated list of role specifications, any of which may bePUBLIC(https://www.postgresql.org/docs/current/sql-grant.html), and PostgreSQL 18 accepts both statements.parse_granteesgives an entry that names no grantee type the type of the entry before it, so thatTO GROUP a, breads both as groups.PUBLICis parsed as one of those types, so the entry after it was read asPUBLICagain and its name was left unconsumed.PUBLICnames a single grantee, so it no longer carries over and the next entry gets no type. MsSql readsPUBLICas an ordinary name and is unaffected.This PR applies to all dialects except MsSql