aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-08-04 05:11:37 +0000
committerBruce Momjian <bruce@momjian.us>2002-08-04 05:11:37 +0000
commit10f1f709abf04cca026f590f18e6f77626e6d93d (patch)
tree3e46082de7af4ffcd53ed5374837d478d553e393 /src
parent6b64704e4f918b10431b51f2739d3874ef999151 (diff)
downloadpostgresql-10f1f709abf04cca026f590f18e6f77626e6d93d.tar.gz
postgresql-10f1f709abf04cca026f590f18e6f77626e6d93d.zip
[ Previous patch reversed.]
Please use this patch instead of my previously submitted one. It is just remerged against HEAD for new alter_table.out stuff. Another reason this patch is useful for _interactive_ users: imagine a view based on a many way join. Imagine creating a complicated insert rule that inserts into all the joined tables and when you insert you get a check failure, but you need to know which actual table the constraint was on that failed! Christopher Kings-Lynne
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/alter_table.out12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index 3833600f2b5..b02aba52d7a 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -409,7 +409,7 @@ create table atacc1 ( test int );
alter table atacc1 add constraint atacc_test1 check (test>3);
-- should fail
insert into atacc1 (test) values (2);
-ERROR: ExecInsert: rejected due to CHECK constraint atacc_test1
+ERROR: ExecInsert: rejected due to CHECK constraint "atacc_test1" on "atacc1"
-- should succeed
insert into atacc1 (test) values (4);
drop table atacc1;
@@ -434,7 +434,7 @@ create table atacc1 ( test int, test2 int, test3 int);
alter table atacc1 add constraint atacc_test1 check (test+test2<test3*4);
-- should fail
insert into atacc1 (test,test2,test3) values (4,4,2);
-ERROR: ExecInsert: rejected due to CHECK constraint atacc_test1
+ERROR: ExecInsert: rejected due to CHECK constraint "atacc_test1" on "atacc1"
-- should succeed
insert into atacc1 (test,test2,test3) values (4,4,5);
drop table atacc1;
@@ -443,7 +443,7 @@ create table atacc1 (test int check (test>3), test2 int);
alter table atacc1 add check (test2>test);
-- should fail for $2
insert into atacc1 (test2, test) values (3, 4);
-ERROR: ExecInsert: rejected due to CHECK constraint $1
+ERROR: ExecInsert: rejected due to CHECK constraint "$1" on "atacc1"
drop table atacc1;
-- inheritance related tests
create table atacc1 (test int);
@@ -452,11 +452,11 @@ create table atacc3 (test3 int) inherits (atacc1, atacc2);
alter table atacc2 add constraint foo check (test2>0);
-- fail and then succeed on atacc2
insert into atacc2 (test2) values (-3);
-ERROR: ExecInsert: rejected due to CHECK constraint foo
+ERROR: ExecInsert: rejected due to CHECK constraint "foo" on "atacc2"
insert into atacc2 (test2) values (3);
-- fail and then succeed on atacc3
insert into atacc3 (test2) values (-3);
-ERROR: ExecInsert: rejected due to CHECK constraint foo
+ERROR: ExecInsert: rejected due to CHECK constraint "foo" on "atacc3"
insert into atacc3 (test2) values (3);
drop table atacc3;
drop table atacc2;
@@ -468,7 +468,7 @@ create table atacc3 (test3 int) inherits (atacc1, atacc2);
alter table only atacc2 add constraint foo check (test2>0);
-- fail and then succeed on atacc2
insert into atacc2 (test2) values (-3);
-ERROR: ExecInsert: rejected due to CHECK constraint foo
+ERROR: ExecInsert: rejected due to CHECK constraint "foo" on "atacc2"
insert into atacc2 (test2) values (3);
-- both succeed on atacc3
insert into atacc3 (test2) values (-3);