summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/inherit.out3
-rw-r--r--src/test/regress/sql/inherit.sql3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/test/regress/expected/inherit.out b/src/test/regress/expected/inherit.out
index 46442e89860..ab80804af9b 100644
--- a/src/test/regress/expected/inherit.out
+++ b/src/test/regress/expected/inherit.out
@@ -645,6 +645,9 @@ Check constraints:
"p2chk" CHECK (ff1 > 10)
Inherits: p1
+-- Test that child does not override inheritable constraints of the parent
+create table c2 (constraint p2chk check (ff1 > 10) no inherit) inherits (p1); --fails
+ERROR: constraint "p2chk" conflicts with inherited constraint on relation "c2"
drop table p1 cascade;
NOTICE: drop cascades to table c1
-- Tests for casting between the rowtypes of parent and child
diff --git a/src/test/regress/sql/inherit.sql b/src/test/regress/sql/inherit.sql
index a5e6ecdb868..d65839899c1 100644
--- a/src/test/regress/sql/inherit.sql
+++ b/src/test/regress/sql/inherit.sql
@@ -157,6 +157,9 @@ create table c1 () inherits (p1);
\d p1
\d c1
+-- Test that child does not override inheritable constraints of the parent
+create table c2 (constraint p2chk check (ff1 > 10) no inherit) inherits (p1); --fails
+
drop table p1 cascade;
-- Tests for casting between the rowtypes of parent and child