Skip to content

feat(parser): model PostgreSQL type domain and extension DDL - #2553

Open
minleejae wants to merge 2 commits into
JSQLParser:masterfrom
minleejae:feat/postgresql-type-ddl
Open

feat(parser): model PostgreSQL type domain and extension DDL#2553
minleejae wants to merge 2 commits into
JSQLParser:masterfrom
minleejae:feat/postgresql-type-ddl

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

Summary

Add structured PostgreSQL CREATE/ALTER TYPE, DOMAIN and EXTENSION statements on top of master, independently of the schema DDL PR #2552.

  • Enum, composite, range and shell type definitions; enum value placement/renaming, composite attribute changes, ownership, renaming and schema moves.
  • Domain defaults, named nullability/check constraints and the corresponding ALTER DOMAIN operations, including NOT VALID.
  • Extension schema/version/cascade options, updates, schema moves and typed member targets, including routine signatures, casts and operator classes/families.
  • Visitor, deparser, table-name discovery, feature classification and PostgreSQL validation integration, with usage examples.

Type names and routine signatures are not treated as table references. Domain expressions remain editable through expression visitors and deparsers. New StatementVisitor overloads have defaults to preserve compatibility with existing implementations.

Base-type I/O definitions and base-type ALTER TYPE SET properties are outside this PR. The obsolete CREATE EXTENSION FROM form is not included.

Validation

  • Full Gradle check, including formatting, static analysis and tests (Spotless ratcheted against upstream/master locally).
  • Maven clean verify and Javadoc generation: 5,455 tests, zero failures/errors, 26 skipped.
  • 94 new regression cases, including 75 SQL round trips and additional AST, construction, traversal and rejection tests.
  • All 75 inputs and regenerated SQL verified with the PostgreSQL 18 grammar through pglast.
  • Seven previously unsupported corpus cases now have concrete ASTs; no regressions among previously modeled cases.
  • Parser generation retains the existing 11 warnings.

References: CREATE TYPE, ALTER TYPE, CREATE DOMAIN, ALTER DOMAIN, CREATE EXTENSION, ALTER EXTENSION.

@manticore-projects

Copy link
Copy Markdown
Contributor

Please resolve conflicts.

@minleejae
minleejae force-pushed the feat/postgresql-type-ddl branch from d85630b to 6bd1885 Compare September 6, 2026 13:52
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