You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The initially implemented syntax, "CHECK NO INHERIT (expr)" was not
deemed very good, so switch to "CHECK (expr) NO INHERIT" instead. This
way it looks similar to SQL-standards compliant constraint attribute.
Backport to 9.2 where the new syntax and feature was introduced.
Per discussion.
Copy file name to clipboardExpand all lines: src/test/regress/expected/inherit.out
+2-2
Original file line number
Diff line number
Diff line change
@@ -597,7 +597,7 @@ select * from d;
597
597
598
598
-- Test non-inheritable parent constraints
599
599
create table p1(ff1 int);
600
-
alter table p1 add constraint p1chk check no inherit (ff1 > 0);
600
+
alter table p1 add constraint p1chk check (ff1 > 0) no inherit;
601
601
alter table p1 add constraint p2chk check (ff1 > 10);
602
602
-- connoinherit should be true for NO INHERIT constraint
603
603
select pc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pgc.connoinherit from pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid = pc.oid) where pc.relname = 'p1' order by 1,2;
-- connoinherit should be true for NO INHERIT constraint
146
146
selectpc.relname, pgc.conname, pgc.contype, pgc.conislocal, pgc.coninhcount, pgc.connoinheritfrom pg_class as pc inner join pg_constraint as pgc on (pgc.conrelid=pc.oid) wherepc.relname='p1'order by1,2;
0 commit comments