Skip to content

Adding support for PostgreSQL's SUBSCRIPTION (CREATE, ALTER, DROP, COMMENT)#2254

Open
LucaCappelletti94 wants to merge 2 commits intoapache:mainfrom
LucaCappelletti94:postgres-regression-9
Open

Adding support for PostgreSQL's SUBSCRIPTION (CREATE, ALTER, DROP, COMMENT)#2254
LucaCappelletti94 wants to merge 2 commits intoapache:mainfrom
LucaCappelletti94:postgres-regression-9

Conversation

@LucaCappelletti94
Copy link
Contributor

This PR adds PostgreSQL parsing support for subscription statements (CREATE SUBSCRIPTION, ALTER SUBSCRIPTION, DROP SUBSCRIPTION, and COMMENT ON SUBSCRIPTION) according to the upstream syntax documented in CREATE SUBSCRIPTION, ALTER SUBSCRIPTION, DROP SUBSCRIPTION, and COMMENT, and it also aligns privilege parsing with PostgreSQL role-style grant/revoke usage from GRANT and REVOKE: implementation-wise, the parser now uses dedicated subscription AST nodes/operations, enforces subscription names as single identifiers (matching PostgreSQL object naming behavior for subscriptions), handles predefined PostgreSQL roles in GRANT/REVOKE via a PostgreSQL-only pg_* path instead of a broad privilege fallback (to preserve typo detection for regular privilege keywords), and gates RESET SESSION AUTHORIZATION to PostgreSQL semantics as described in RESET.

If anybody's wondering where all of these PRs are coming from, I am running differential fuzzing against sqlparser vs postgres 18. It's a bit of a blood bath. Maybe we should have at least a unit test running against postgres's regression statements?

@LucaCappelletti94 LucaCappelletti94 marked this pull request as ready for review February 27, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant