Skip to content

PostgreSQL: Parse OPTION FOR in a role membership REVOKE - #2736

Merged
LucaCappelletti94 merged 2 commits into
upstream/postgres-revoke-role-membershipfrom
upstream/postgres-revoke-role-option-for
Oct 28, 2026
Merged

LucaCappelletti94 merged 2 commits into
upstream/postgres-revoke-role-membershipfrom
upstream/postgres-revoke-role-option-for

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

REVOKE ADMIN OPTION FOR bypasser FROM anon failed with Expected: a privilege keyword, found: ADMIN. PostgreSQL withdraws one option of a role membership while keeping the membership with name OPTION FOR, such as ADMIN OPTION FOR or, from PostgreSQL 16, SET OPTION FOR (REVOKE).

RevokeRole now keeps the name as option_for. GRANT OPTION FOR still goes to the privilege form, and the name stays an identifier because PostgreSQL's grammar accepts any name there.

@LucaCappelletti94 LucaCappelletti94 added the enhancement New feature or request label Oct 27, 2026
@codecov-commenter

codecov-commenter commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (upstream/postgres-revoke-role-membership@835ae9a). Learn more about missing BASE report.

Additional details and impacted files
@@                             Coverage Diff                             @@
##             upstream/postgres-revoke-role-membership    #2736   +/-   ##
===========================================================================
  Coverage                                            ?   82.41%           
===========================================================================
  Files                                               ?       42           
  Lines                                               ?    35402           
  Branches                                            ?    35402           
===========================================================================
  Hits                                                ?    29177           
  Misses                                              ?     2679           
  Partials                                            ?     3546           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/postgres-revoke-role-option-for branch from b2ccf09 to e766f2c Compare October 28, 2026 07:51
@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/postgres-revoke-role-option-for branch from e766f2c to fffc66c Compare October 28, 2026 11:29
@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/postgres-revoke-role-option-for branch from fffc66c to 3ab6ea9 Compare October 28, 2026 11:56
@LucaCappelletti94

Copy link
Copy Markdown
Contributor Author

Thanks @sabir-akhadov-localstack for reviewing the stack of PRs, I will now merge both.

cc @alamb

@LucaCappelletti94
LucaCappelletti94 added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit a75e736 Oct 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PostgreSQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants