Skip to content

fix(parser): model PostgreSQL declarative partitions - #2535

Merged
manticore-projects merged 2 commits into
JSQLParser:masterfrom
minleejae:fix/postgresql-declarative-partitions-2522
Sep 4, 2026
Merged

fix(parser): model PostgreSQL declarative partitions#2535
manticore-projects merged 2 commits into
JSQLParser:masterfrom
minleejae:fix/postgresql-declarative-partitions-2522

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

Summary

  • add a shared structured partition-bound model for RANGE, LIST, HASH, and DEFAULT partitions
  • support ordered multi-column PARTITION BY keys and CREATE TABLE ... PARTITION OF
  • model ALTER TABLE ... ATTACH PARTITION and DETACH PARTITION, including CONCURRENTLY and FINALIZE
  • update both statement rendering and deparser paths

The CREATE and ALTER changes are combined because they depend on the same partition-bound AST.

Testing

  • ./gradlew check

Fixes #2522
Fixes #2523

AI assistance

OpenAI Codex assisted with the implementation and test coverage. The changes were manually reviewed and verified against PostgreSQL syntax.

@manticore-projects

Copy link
Copy Markdown
Contributor

Thank you!

@manticore-projects
manticore-projects merged commit c77bb0f into JSQLParser:master Sep 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants