@@ -599,6 +599,7 @@ insert into atacc1 (test) values (4);
599599-- inserting NULL should fail
600600insert into atacc1 (test) values(NULL);
601601ERROR: null value in column "test" violates not-null constraint
602+ DETAIL: Failing row contains (null).
602603-- try adding a second primary key (should fail)
603604alter table atacc1 add constraint atacc_oid1 primary key(oid);
604605ERROR: multiple primary keys for table "atacc1" are not allowed
@@ -664,10 +665,13 @@ ERROR: duplicate key value violates unique constraint "atacc_test1"
664665DETAIL: Key (test, test2)=(4, 4) already exists.
665666insert into atacc1 (test,test2) values (NULL,3);
666667ERROR: null value in column "test" violates not-null constraint
668+ DETAIL: Failing row contains (null, 3).
667669insert into atacc1 (test,test2) values (3, NULL);
668670ERROR: null value in column "test2" violates not-null constraint
671+ DETAIL: Failing row contains (3, null).
669672insert into atacc1 (test,test2) values (NULL,NULL);
670673ERROR: null value in column "test" violates not-null constraint
674+ DETAIL: Failing row contains (null, null).
671675-- should all succeed
672676insert into atacc1 (test,test2) values (4,5);
673677insert into atacc1 (test,test2) values (5,4);
@@ -683,6 +687,7 @@ ERROR: duplicate key value violates unique constraint "atacc1_pkey"
683687DETAIL: Key (test)=(3) already exists.
684688insert into atacc1 (test2, test) values (1, NULL);
685689ERROR: null value in column "test" violates not-null constraint
690+ DETAIL: Failing row contains (null, 1).
686691drop table atacc1;
687692-- alter table / alter column [set/drop] not null tests
688693-- try altering system catalogs, should fail
@@ -733,8 +738,10 @@ create table child (b varchar(255)) inherits (parent);
733738alter table parent alter a set not null;
734739insert into parent values (NULL);
735740ERROR: null value in column "a" violates not-null constraint
741+ DETAIL: Failing row contains (null).
736742insert into child (a, b) values (NULL, 'foo');
737743ERROR: null value in column "a" violates not-null constraint
744+ DETAIL: Failing row contains (null, foo).
738745alter table parent alter a drop not null;
739746insert into parent values (NULL);
740747insert into child (a, b) values (NULL, 'foo');
@@ -746,13 +753,16 @@ delete from parent;
746753alter table only parent alter a set not null;
747754insert into parent values (NULL);
748755ERROR: null value in column "a" violates not-null constraint
756+ DETAIL: Failing row contains (null).
749757alter table child alter a set not null;
750758insert into child (a, b) values (NULL, 'foo');
751759ERROR: null value in column "a" violates not-null constraint
760+ DETAIL: Failing row contains (null, foo).
752761delete from child;
753762alter table child alter a set not null;
754763insert into child (a, b) values (NULL, 'foo');
755764ERROR: null value in column "a" violates not-null constraint
765+ DETAIL: Failing row contains (null, foo).
756766drop table child;
757767drop table parent;
758768-- test setting and removing default values
0 commit comments