Skip to content

PostgreSQL: parse DROP GROUP - #2712

Open
LucaCappelletti94 wants to merge 3 commits into
mainfrom
pg-drop-group
Open

LucaCappelletti94 wants to merge 3 commits into
mainfrom
pg-drop-group

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

PostgreSQL accepts DROP GROUP [IF EXISTS] name [, ...] as an alias for DROP ROLE.

Sliced out of #2429 to minimize size of both PRs, although they will have some collisions and need a rebase since they are in older external branches and I could not stack them.

PostgreSQL syntax reference https://www.postgresql.org/docs/current/sql-dropgroup.html

@LucaCappelletti94 LucaCappelletti94 added enhancement New feature or request PostgreSQL labels Oct 24, 2026
@codecov-commenter

codecov-commenter commented Oct 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.49%. Comparing base (a9c0767) to head (a22bf96).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2712      +/-   ##
==========================================
+ Coverage   82.48%   82.49%   +0.01%     
==========================================
  Files          42       42              
  Lines       35468    35479      +11     
  Branches    35468    35479      +11     
==========================================
+ Hits        29255    29269      +14     
+ Misses       2676     2674       -2     
+ Partials     3537     3536       -1     

☔ 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-drop-group branch 4 times, most recently from 10c2655 to 5427133 Compare October 26, 2026 20:18
Comment thread src/parser/mod.rs Outdated
} else {
return self.expected_ref(
"COLLATION, CONNECTOR, DATABASE, EXTENSION, FUNCTION, INDEX, OPERATOR, POLICY, PROCEDURE, ROLE, SCHEMA, SECRET, SEQUENCE, STAGE, TABLE, TRIGGER, TYPE, VIEW, MATERIALIZED VIEW, USER or WAREHOUSE after DROP",
"COLLATION, CONNECTOR, DATABASE, EXTENSION, FUNCTION, GROUP, INDEX, OPERATOR, POLICY, PROCEDURE, ROLE, SCHEMA, SECRET, SEQUENCE, STAGE, TABLE, TRIGGER, TYPE, VIEW, MATERIALIZED VIEW, USER or WAREHOUSE after DROP",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: on dialects without supports_drop_group this now reads Expected: ... GROUP, ... after DROP, found: GROUP (the gated test asserts exactly that). Listing GROUP only when the dialect supports it would avoid the contradiction.

@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-drop-group branch 3 times, most recently from 4ad78d9 to 6ff6e2a Compare October 28, 2026 20:13
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