Skip to content

fix: share PostgreSQL typed and partition table column overrides - #2693

Merged
manticore-projects merged 3 commits into
JSQLParser:masterfrom
minleejae:fix/postgresql-table-column-overrides
Sep 25, 2026
Merged

manticore-projects merged 3 commits into
JSQLParser:masterfrom
minleejae:fix/postgresql-table-column-overrides

Conversation

@minleejae

@minleejae minleejae commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Fix CREATE TABLE OF type-name parsing so the first column override is not mistaken for a type argument. Parse PARTITION OF overrides without requiring a new data type.

Both forms reuse the existing typed column-definition path and common ColumnDefinitionOption AST/rendering, also used by ALTER column definitions. Preserve the public ColDataType API for OF, and distinguish bare overrides from CTAS output-column lists.

Validation:

  • Full Gradle check passed (Java 17), including grammar ambiguity, unit tests, coverage, formatting, Checkstyle, PMD, and SpotBugs.
  • PostgreSQL 17.11 created typed and partition-child tables with overridden defaults and NOT NULL constraints; inserting default rows yielded the expected value through every rendering.
  • 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

Copy link
Copy Markdown
Contributor

sorry, conflict again.

Signed-off-by: minleejae <mmj9808@gmail.com>
@manticore-projects
manticore-projects merged commit ef66801 into JSQLParser:master Sep 25, 2026
10 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

Development

Successfully merging this pull request may close these issues.

2 participants