summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut2025-03-27 11:11:15 +0000
committerPeter Eisentraut2025-03-27 11:11:15 +0000
commit5d5f415816a60a3c5c5e4420eff55e73edfbd9f5 (patch)
tree1cfdde3e9c9a1b4db7ddac80c6afde03128599c1 /src
parentb98be8a2a2a6196dc24631dfe4d8785b86800d23 (diff)
Expand test a bit
Make pg_constraint output in inherit test show the convalidated column as well. This shows the interaction between convalidated and conenforced. This is extracted from a larger patch so that this reformatting isn't distracting there. Author: Amul Sul <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/CAAJ_b962c5AcYW9KUt_R_ER5qs3fUGbe4az-SP-vuwPS-w-AGA@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/inherit.out66
-rw-r--r--src/test/regress/sql/inherit.sql2
2 files changed, 34 insertions, 34 deletions
diff --git a/src/test/regress/expected/inherit.out b/src/test/regress/expected/inherit.out
index 58461e7f53f..4d07d0bd79b 100644
--- a/src/test/regress/expected/inherit.out
+++ b/src/test/regress/expected/inherit.out
@@ -1353,41 +1353,41 @@ create table p1_fail(f1 int constraint inh_check_constraint6 check (f1 < 10) not
NOTICE: merging multiple inherited definitions of column "f1"
NOTICE: merging column "f1" with inherited definition
ERROR: constraint "inh_check_constraint6" conflicts with NOT ENFORCED constraint on relation "p1_fail"
-select conrelid::regclass::text as relname, conname, conislocal, coninhcount, conenforced
+select conrelid::regclass::text as relname, conname, conislocal, coninhcount, conenforced, convalidated
from pg_constraint where conname like 'inh\_check\_constraint%'
order by 1, 2;
- relname | conname | conislocal | coninhcount | conenforced
----------+-----------------------+------------+-------------+-------------
- p1 | inh_check_constraint1 | t | 0 | t
- p1 | inh_check_constraint2 | t | 0 | t
- p1 | inh_check_constraint3 | t | 0 | f
- p1 | inh_check_constraint4 | t | 0 | f
- p1 | inh_check_constraint5 | t | 0 | f
- p1 | inh_check_constraint6 | t | 0 | f
- p1 | inh_check_constraint8 | t | 0 | t
- p1_c1 | inh_check_constraint1 | t | 1 | t
- p1_c1 | inh_check_constraint2 | t | 1 | t
- p1_c1 | inh_check_constraint3 | t | 1 | f
- p1_c1 | inh_check_constraint4 | t | 1 | f
- p1_c1 | inh_check_constraint5 | t | 1 | t
- p1_c1 | inh_check_constraint6 | t | 1 | t
- p1_c1 | inh_check_constraint7 | t | 0 | f
- p1_c1 | inh_check_constraint8 | f | 1 | t
- p1_c2 | inh_check_constraint1 | f | 1 | t
- p1_c2 | inh_check_constraint2 | f | 1 | t
- p1_c2 | inh_check_constraint3 | f | 1 | f
- p1_c2 | inh_check_constraint4 | t | 1 | t
- p1_c2 | inh_check_constraint5 | f | 1 | f
- p1_c2 | inh_check_constraint6 | f | 1 | f
- p1_c2 | inh_check_constraint8 | f | 1 | t
- p1_c3 | inh_check_constraint1 | f | 2 | t
- p1_c3 | inh_check_constraint2 | f | 2 | t
- p1_c3 | inh_check_constraint3 | f | 2 | f
- p1_c3 | inh_check_constraint4 | f | 2 | f
- p1_c3 | inh_check_constraint5 | f | 2 | t
- p1_c3 | inh_check_constraint6 | f | 2 | t
- p1_c3 | inh_check_constraint7 | f | 1 | f
- p1_c3 | inh_check_constraint8 | f | 2 | t
+ relname | conname | conislocal | coninhcount | conenforced | convalidated
+---------+-----------------------+------------+-------------+-------------+--------------
+ p1 | inh_check_constraint1 | t | 0 | t | t
+ p1 | inh_check_constraint2 | t | 0 | t | t
+ p1 | inh_check_constraint3 | t | 0 | f | f
+ p1 | inh_check_constraint4 | t | 0 | f | f
+ p1 | inh_check_constraint5 | t | 0 | f | f
+ p1 | inh_check_constraint6 | t | 0 | f | f
+ p1 | inh_check_constraint8 | t | 0 | t | t
+ p1_c1 | inh_check_constraint1 | t | 1 | t | t
+ p1_c1 | inh_check_constraint2 | t | 1 | t | t
+ p1_c1 | inh_check_constraint3 | t | 1 | f | f
+ p1_c1 | inh_check_constraint4 | t | 1 | f | f
+ p1_c1 | inh_check_constraint5 | t | 1 | t | t
+ p1_c1 | inh_check_constraint6 | t | 1 | t | t
+ p1_c1 | inh_check_constraint7 | t | 0 | f | f
+ p1_c1 | inh_check_constraint8 | f | 1 | t | t
+ p1_c2 | inh_check_constraint1 | f | 1 | t | t
+ p1_c2 | inh_check_constraint2 | f | 1 | t | t
+ p1_c2 | inh_check_constraint3 | f | 1 | f | f
+ p1_c2 | inh_check_constraint4 | t | 1 | t | t
+ p1_c2 | inh_check_constraint5 | f | 1 | f | f
+ p1_c2 | inh_check_constraint6 | f | 1 | f | f
+ p1_c2 | inh_check_constraint8 | f | 1 | t | t
+ p1_c3 | inh_check_constraint1 | f | 2 | t | t
+ p1_c3 | inh_check_constraint2 | f | 2 | t | t
+ p1_c3 | inh_check_constraint3 | f | 2 | f | f
+ p1_c3 | inh_check_constraint4 | f | 2 | f | f
+ p1_c3 | inh_check_constraint5 | f | 2 | t | t
+ p1_c3 | inh_check_constraint6 | f | 2 | t | t
+ p1_c3 | inh_check_constraint7 | f | 1 | f | f
+ p1_c3 | inh_check_constraint8 | f | 2 | t | t
(30 rows)
drop table p1 cascade;
diff --git a/src/test/regress/sql/inherit.sql b/src/test/regress/sql/inherit.sql
index 8df0f8af08a..941189761fd 100644
--- a/src/test/regress/sql/inherit.sql
+++ b/src/test/regress/sql/inherit.sql
@@ -498,7 +498,7 @@ create table p1_c3() inherits(p1, p1_c1);
-- but not allowed if the child constraint is explicitly asked to be NOT ENFORCED
create table p1_fail(f1 int constraint inh_check_constraint6 check (f1 < 10) not enforced) inherits(p1, p1_c1);
-select conrelid::regclass::text as relname, conname, conislocal, coninhcount, conenforced
+select conrelid::regclass::text as relname, conname, conislocal, coninhcount, conenforced, convalidated
from pg_constraint where conname like 'inh\_check\_constraint%'
order by 1, 2;