@@ -360,7 +360,7 @@ alter table atacc3 add constraint foo check (test2>0);
360
360
alter table atacc3 inherit atacc2;
361
361
-- fail due to duplicates and circular inheritance
362
362
alter table atacc3 inherit atacc2;
363
- ERROR: inherited relation "atacc2" duplicated
363
+ ERROR: relation "atacc2" would be inherited from more than once
364
364
alter table atacc2 inherit atacc3;
365
365
ERROR: circular inheritance not allowed
366
366
DETAIL: "atacc3" is already a child of "atacc2".
@@ -402,7 +402,7 @@ NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "atacc_test1" for t
402
402
insert into atacc1 (test) values (2);
403
403
-- should fail
404
404
insert into atacc1 (test) values (2);
405
- ERROR: duplicate key violates unique constraint "atacc_test1"
405
+ ERROR: duplicate key value violates unique constraint "atacc_test1"
406
406
-- should succeed
407
407
insert into atacc1 (test) values (4);
408
408
-- try adding a unique oid constraint
@@ -437,7 +437,7 @@ NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "atacc_test1" for t
437
437
insert into atacc1 (test,test2) values (4,4);
438
438
-- should fail
439
439
insert into atacc1 (test,test2) values (4,4);
440
- ERROR: duplicate key violates unique constraint "atacc_test1"
440
+ ERROR: duplicate key value violates unique constraint "atacc_test1"
441
441
-- should all succeed
442
442
insert into atacc1 (test,test2) values (4,5);
443
443
insert into atacc1 (test,test2) values (5,4);
@@ -451,7 +451,7 @@ NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "atacc1_test2_key"
451
451
-- should fail for @@ second one @@
452
452
insert into atacc1 (test2, test) values (3, 3);
453
453
insert into atacc1 (test2, test) values (2, 3);
454
- ERROR: duplicate key violates unique constraint "atacc1_test_key"
454
+ ERROR: duplicate key value violates unique constraint "atacc1_test_key"
455
455
drop table atacc1;
456
456
-- test primary key constraint adding
457
457
create table atacc1 ( test int ) with oids;
@@ -462,7 +462,7 @@ NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "atacc_test1"
462
462
insert into atacc1 (test) values (2);
463
463
-- should fail
464
464
insert into atacc1 (test) values (2);
465
- ERROR: duplicate key violates unique constraint "atacc_test1"
465
+ ERROR: duplicate key value violates unique constraint "atacc_test1"
466
466
-- should succeed
467
467
insert into atacc1 (test) values (4);
468
468
-- inserting NULL should fail
@@ -517,7 +517,7 @@ ERROR: multiple primary keys for table "atacc1" are not allowed
517
517
insert into atacc1 (test,test2) values (4,4);
518
518
-- should fail
519
519
insert into atacc1 (test,test2) values (4,4);
520
- ERROR: duplicate key violates unique constraint "atacc_test1"
520
+ ERROR: duplicate key value violates unique constraint "atacc_test1"
521
521
insert into atacc1 (test,test2) values (NULL,3);
522
522
ERROR: null value in column "test" violates not-null constraint
523
523
insert into atacc1 (test,test2) values (3, NULL);
@@ -535,7 +535,7 @@ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "atacc1_pkey" for
535
535
-- only first should succeed
536
536
insert into atacc1 (test2, test) values (3, 3);
537
537
insert into atacc1 (test2, test) values (2, 3);
538
- ERROR: duplicate key violates unique constraint "atacc1_pkey"
538
+ ERROR: duplicate key value violates unique constraint "atacc1_pkey"
539
539
insert into atacc1 (test2, test) values (1, NULL);
540
540
ERROR: null value in column "test" violates not-null constraint
541
541
drop table atacc1;
0 commit comments