Skip to content

Adding support for TABLESPACE#2253

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

Adding support for TABLESPACE#2253
LucaCappelletti94 wants to merge 2 commits intoapache:mainfrom
LucaCappelletti94:postgres-regression-8

Conversation

@LucaCappelletti94
Copy link
Copy Markdown
Contributor

This PR adds cross-dialect TABLESPACE support by implementing PostgreSQL forms (CREATE/ALTER/DROP TABLESPACE) and MySQL forms (CREATE/ALTER/DROP [UNDO] TABLESPACE) with Generic dialect handling both syntaxes as a union parser, using explicit AST modeling instead of loose keyword parsing: CreateTablespace now carries dialect-specific definitions, MySQL ALTER TABLESPACE is represented as an ordered list of options to preserve multi-clause statements, and DROP TABLESPACE has a dedicated statement type to avoid over-accepting generic DROP behaviors and to keep dialect rules explicit (for example, PostgreSQL IF EXISTS vs MySQL-specific clauses)

Syntax and behavior were aligned against the official documentation for PostgreSQL CREATE TABLESPACE, PostgreSQL ALTER TABLESPACE, PostgreSQL DROP TABLESPACE, MySQL CREATE TABLESPACE, MySQL ALTER TABLESPACE, and MySQL DROP TABLESPACE, with coverage added in both MySQL and PostgreSQL parser tests.

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.

@LucaCappelletti94 LucaCappelletti94 marked this pull request as ready for review February 27, 2026 10:29
@github-actions
Copy link
Copy Markdown

Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Apr 29, 2026
@LucaCappelletti94 LucaCappelletti94 force-pushed the postgres-regression-8 branch from 58b7719 to 9c7d91b Compare May 4, 2026 18:35
@github-actions github-actions Bot removed the Stale label May 5, 2026
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