Skip to content

feat: support PostgreSQL CHECK NO INHERIT - #2679

Open
minleejae wants to merge 1 commit into
JSQLParser:masterfrom
minleejae:feat/postgresql-check-no-inherit
Open

minleejae wants to merge 1 commit into
JSQLParser:masterfrom
minleejae:feat/postgresql-check-no-inherit

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

In POSTGRESQL mode, support CHECK (expression) NO INHERIT, including ALTER ADD with NOT VALID. Expose inheritance as CheckConstraint.isNoInherit() / setNoInherit() / withNoInherit(), independently of the existing validation flag.

Reuse the CHECK production for PostgreSQL column constraints as well as CREATE/ALTER table constraints, so column-level expressions remain structured and visitable. Both renderers read the editable AST. Includes construction/mutation, existing ENFORCED options, expression traversal and parse/deparse/reparse tests plus usage documentation.

Validation: full Gradle check on Java 17; original and rendered DDL executed on PostgreSQL 18 for ALTER plus named/unnamed column and table CREATE forms. Verified the ALTER constraint's connoinherit=true and convalidated=false in pg_constraint.

Syntax references: https://www.postgresql.org/docs/18/sql-createtable.html and https://www.postgresql.org/docs/18/sql-altertable.html

Signed-off-by: minleejae <mmj9808@gmail.com>
@minleejae
minleejae force-pushed the feat/postgresql-check-no-inherit branch from 85cfccf to 70bc5af Compare September 22, 2026 09:38
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