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.31%. Comparing base (583c4d4) to head (5427133).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2712      +/-   ##
==========================================
+ Coverage   82.30%   82.31%   +0.01%     
==========================================
  Files          42       42              
  Lines       35307    35317      +10     
  Branches    35307    35317      +10     
==========================================
+ Hits        29058    29072      +14     
+ Misses       2691     2687       -4     
  Partials     3558     3558              

☔ 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 3 times, most recently from 0214e6a to 10c2655 Compare October 26, 2026 18:58
Comment thread src/parser/mod.rs
} 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.

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