Skip to content

feat: model PostgreSQL table inheritance references - #2692

Merged
manticore-projects merged 2 commits into
JSQLParser:masterfrom
minleejae:feat/postgresql-table-inheritance
Sep 24, 2026
Merged

manticore-projects merged 2 commits into
JSQLParser:masterfrom
minleejae:feat/postgresql-table-inheritance

Conversation

@minleejae

@minleejae minleejae commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Parse PostgreSQL INHERITS parents as ordered Table references, including schema-qualified and quoted names. This makes inherited dependencies visible to table-name discovery and editable through the AST.

Share inheritance rendering between toString and CreateTableDeParser, reuse TableDefinitionTraversal for parent references, and retain explicit empty column definitions such as CREATE TABLE child () INHERITS (parent).

Validation:

  • Full Gradle check passed (Java 17), including grammar ambiguity, unit tests, coverage, formatting, Checkstyle, PMD, and SpotBugs.
  • PostgreSQL 17.11 accepted multiple parents and inherited defaults; original and rendered SQL produced the same columns and values.
  • Added AST, mutation, and parse/deparse regression coverage.

Syntax reference: official documentation.

Additional version-boundary validation: the original, toString, and deparser SQL was executed on PostgreSQL 18.6, including the focused behavioral cases. Reviewed the PostgreSQL 18 grammar. Runtime version numbers above identify the tested binaries; this does not claim support for every statement in those DBMS versions.

Signed-off-by: minleejae <mmj9808@gmail.com>
@manticore-projects

Copy link
Copy Markdown
Contributor

Please resolve conflicts.

Signed-off-by: minleejae <mmj9808@gmail.com>
@manticore-projects
manticore-projects merged commit dba1eba into JSQLParser:master Sep 24, 2026
4 checks passed
@manticore-projects

manticore-projects commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Thank you much. Although I wonder when GitHub will kick us out based on the volume of changes you are crafting :-D

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.

2 participants