Skip to content

PostgreSQL: parse DROP GROUP - #2712

Merged
LucaCappelletti94 merged 3 commits into
mainfrom
pg-drop-group
Oct 30, 2026
Merged

LucaCappelletti94 merged 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.59%. Comparing base (06c0468) to head (2a92716).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2712   +/-   ##
=======================================
  Coverage   82.58%   82.59%           
=======================================
  Files          42       42           
  Lines       35565    35575   +10     
  Branches    35565    35575   +10     
=======================================
+ Hits        29371    29382   +11     
+ Misses       2660     2659    -1     
  Partials     3534     3534           

☔ 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 6 times, most recently from d974bcc to a3e21f2 Compare October 30, 2026 08:30

@s5dsn-eqee s5dsn-eqee left a comment

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.

LGTM!

@LucaCappelletti94

Copy link
Copy Markdown
Contributor Author

Thanks for the review @s5dsn-eqee and @sabir-akhadov-localstack, I will be merging this now.

cc @alamb

@LucaCappelletti94
LucaCappelletti94 added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit e7c4410 Oct 30, 2026
10 checks passed
@alamb

alamb commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Just trying to keep up with the onslaught

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.

5 participants