Skip to content

Support NO INHERIT modifier on CHECK constraints - #2435

Open
LucaCappelletti94 wants to merge 1 commit into
apache:mainfrom
LucaCappelletti94:pg-check-no-inherit
Open

Support NO INHERIT modifier on CHECK constraints#2435
LucaCappelletti94 wants to merge 1 commit into
apache:mainfrom
LucaCappelletti94:pg-check-no-inherit

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

PostgreSQL marks constraints that child tables should not inherit with NO INHERIT, and pg_dump emits it for any schema using table inheritance. The parser rejected it in every position:

ALTER TABLE docs ADD CONSTRAINT c CHECK (id > 0) NO INHERIT;
-- Expected: end of statement, found: NO

CREATE TABLE t (a INT, CONSTRAINT c CHECK (a > 0) NO INHERIT);
-- Expected: ',' or ')' after column definition, found: NO

Relevant doc: https://www.postgresql.org/docs/current/sql-createtable.html

@LucaCappelletti94
LucaCappelletti94 marked this pull request as ready for review August 7, 2026 08:45
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