Skip to content

Support PostgreSQL ALTER DEFAULT PRIVILEGES - #2417

Open
LucaCappelletti94 wants to merge 1 commit into
apache:mainfrom
LucaCappelletti94:pg-alter-default-privileges
Open

LucaCappelletti94 wants to merge 1 commit into
apache:mainfrom
LucaCappelletti94:pg-alter-default-privileges

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

ALTER DEFAULT PRIVILEGES was not a recognised ALTER target, so it failed at the DEFAULT keyword.

The statement now parses into AlterDefaultPrivileges, carrying the optional FOR ROLE and IN SCHEMA lists and the abbreviated GRANT or REVOKE, so it round trips rather than being consumed and discarded.

I tried to maximize code reuse from analogous structs.
All of these PRs come from trying to parse pg_dump -s outputs.

@LucaCappelletti94
LucaCappelletti94 marked this pull request as ready for review July 30, 2026 19:31
@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-alter-default-privileges branch from 71004b0 to 72c56b7 Compare July 30, 2026 19:33
@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-alter-default-privileges branch 3 times, most recently from b4a960e to 3facc79 Compare August 24, 2026 11:47
@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-alter-default-privileges branch from 3facc79 to d40962c Compare September 3, 2026 17:05
@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-alter-default-privileges branch 4 times, most recently from 1547f09 to d586a2b Compare September 22, 2026 21:20
LucaCappelletti94 added a commit to LucaCappelletti94/sqlparser-rs that referenced this pull request Oct 2, 2026
@codecov-commenter

codecov-commenter commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.21053% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.15%. Comparing base (1ba145b) to head (a1d021b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/parser/mod.rs 85.33% 3 Missing and 8 partials ⚠️
src/ast/dcl.rs 83.92% 3 Missing and 6 partials ⚠️
src/ast/spans.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2417    +/-   ##
========================================
  Coverage   81.14%   81.15%            
========================================
  Files          42       42            
  Lines       33739    33866   +127     
  Branches    33739    33866   +127     
========================================
+ Hits        27379    27485   +106     
- Misses       2797     2804     +7     
- Partials     3563     3577    +14     

☔ 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 pg-alter-default-privileges branch from afa4119 to a1d021b Compare October 2, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants