diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2007-06-03 22:16:03 +0000 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2007-06-03 22:16:03 +0000 |
| commit | f4a3789b39e91635ad9eec6d46be305d3302219e (patch) | |
| tree | 1a777decea580636ca64a21d53e45f706688a8c1 /src/test | |
| parent | 55477d742e3586b9e8cd107b3cb38933ca5a3139 (diff) | |
| download | postgresql-f4a3789b39e91635ad9eec6d46be305d3302219e.tar.gz | |
Clarify some error messages about duplicate things.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/alter_table.out | 14 | ||||
| -rw-r--r-- | src/test/regress/expected/arrays.out | 2 | ||||
| -rw-r--r-- | src/test/regress/expected/create_index.out | 6 | ||||
| -rw-r--r-- | src/test/regress/expected/inherit.out | 2 | ||||
| -rw-r--r-- | src/test/regress/expected/plpgsql.out | 4 | ||||
| -rw-r--r-- | src/test/regress/expected/transactions.out | 4 | ||||
| -rw-r--r-- | src/test/regress/expected/uuid.out | 2 | ||||
| -rw-r--r-- | src/test/regress/output/constraints.source | 6 | ||||
| -rw-r--r-- | src/test/regress/output/tablespace.source | 2 |
9 files changed, 21 insertions, 21 deletions
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index 99f0c0b049..bf2d66af49 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -360,7 +360,7 @@ alter table atacc3 add constraint foo check (test2>0); alter table atacc3 inherit atacc2; -- fail due to duplicates and circular inheritance alter table atacc3 inherit atacc2; -ERROR: inherited relation "atacc2" duplicated +ERROR: relation "atacc2" would be inherited from more than once alter table atacc2 inherit atacc3; ERROR: circular inheritance not allowed 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 insert into atacc1 (test) values (2); -- should fail insert into atacc1 (test) values (2); -ERROR: duplicate key violates unique constraint "atacc_test1" +ERROR: duplicate key value violates unique constraint "atacc_test1" -- should succeed insert into atacc1 (test) values (4); -- try adding a unique oid constraint @@ -437,7 +437,7 @@ NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "atacc_test1" for t insert into atacc1 (test,test2) values (4,4); -- should fail insert into atacc1 (test,test2) values (4,4); -ERROR: duplicate key violates unique constraint "atacc_test1" +ERROR: duplicate key value violates unique constraint "atacc_test1" -- should all succeed insert into atacc1 (test,test2) values (4,5); insert into atacc1 (test,test2) values (5,4); @@ -451,7 +451,7 @@ NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "atacc1_test2_key" -- should fail for @@ second one @@ insert into atacc1 (test2, test) values (3, 3); insert into atacc1 (test2, test) values (2, 3); -ERROR: duplicate key violates unique constraint "atacc1_test_key" +ERROR: duplicate key value violates unique constraint "atacc1_test_key" drop table atacc1; -- test primary key constraint adding create table atacc1 ( test int ) with oids; @@ -462,7 +462,7 @@ NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "atacc_test1" insert into atacc1 (test) values (2); -- should fail insert into atacc1 (test) values (2); -ERROR: duplicate key violates unique constraint "atacc_test1" +ERROR: duplicate key value violates unique constraint "atacc_test1" -- should succeed insert into atacc1 (test) values (4); -- inserting NULL should fail @@ -517,7 +517,7 @@ ERROR: multiple primary keys for table "atacc1" are not allowed insert into atacc1 (test,test2) values (4,4); -- should fail insert into atacc1 (test,test2) values (4,4); -ERROR: duplicate key violates unique constraint "atacc_test1" +ERROR: duplicate key value violates unique constraint "atacc_test1" insert into atacc1 (test,test2) values (NULL,3); ERROR: null value in column "test" violates not-null constraint insert into atacc1 (test,test2) values (3, NULL); @@ -535,7 +535,7 @@ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "atacc1_pkey" for -- only first should succeed insert into atacc1 (test2, test) values (3, 3); insert into atacc1 (test2, test) values (2, 3); -ERROR: duplicate key violates unique constraint "atacc1_pkey" +ERROR: duplicate key value violates unique constraint "atacc1_pkey" insert into atacc1 (test2, test) values (1, NULL); ERROR: null value in column "test" violates not-null constraint drop table atacc1; diff --git a/src/test/regress/expected/arrays.out b/src/test/regress/expected/arrays.out index 936db41c4b..0f611bf7d7 100644 --- a/src/test/regress/expected/arrays.out +++ b/src/test/regress/expected/arrays.out @@ -703,7 +703,7 @@ insert into arr_tbl values ('{1,2,3}'); insert into arr_tbl values ('{1,2}'); -- failure expected: insert into arr_tbl values ('{1,2,3}'); -ERROR: duplicate key violates unique constraint "arr_tbl_f1_key" +ERROR: duplicate key value violates unique constraint "arr_tbl_f1_key" insert into arr_tbl values ('{2,3,4}'); insert into arr_tbl values ('{1,5,3}'); insert into arr_tbl values ('{1,2,10}'); diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out index bd785fb8b1..adec0e6c84 100644 --- a/src/test/regress/expected/create_index.out +++ b/src/test/regress/expected/create_index.out @@ -348,7 +348,7 @@ INSERT INTO func_index_heap VALUES('AB','CDEFG'); INSERT INTO func_index_heap VALUES('QWE','RTY'); -- this should fail because of unique index: INSERT INTO func_index_heap VALUES('ABCD', 'EF'); -ERROR: duplicate key violates unique constraint "func_index_index" +ERROR: duplicate key value violates unique constraint "func_index_index" -- but this shouldn't: INSERT INTO func_index_heap VALUES('QWERTY'); -- @@ -362,7 +362,7 @@ INSERT INTO func_index_heap VALUES('AB','CDEFG'); INSERT INTO func_index_heap VALUES('QWE','RTY'); -- this should fail because of unique index: INSERT INTO func_index_heap VALUES('ABCD', 'EF'); -ERROR: duplicate key violates unique constraint "func_index_index" +ERROR: duplicate key value violates unique constraint "func_index_index" -- but this shouldn't: INSERT INTO func_index_heap VALUES('QWERTY'); -- @@ -386,7 +386,7 @@ INSERT INTO concur_heap VALUES ('b','b'); CREATE UNIQUE INDEX CONCURRENTLY concur_index2 ON concur_heap(f1); -- check if constraint is set up properly to be enforced INSERT INTO concur_heap VALUES ('b','x'); -ERROR: duplicate key violates unique constraint "concur_index2" +ERROR: duplicate key value violates unique constraint "concur_index2" -- check if constraint is enforced properly at build time CREATE UNIQUE INDEX CONCURRENTLY concur_index3 ON concur_heap(f2); ERROR: could not create unique index diff --git a/src/test/regress/expected/inherit.out b/src/test/regress/expected/inherit.out index f4bdb8d825..fa97f019b1 100644 --- a/src/test/regress/expected/inherit.out +++ b/src/test/regress/expected/inherit.out @@ -605,7 +605,7 @@ SELECT * FROM a; /* Has ee entry */ (1 row) CREATE TABLE inhf (LIKE inhx, LIKE inhx); /* Throw error */ -ERROR: column "xx" duplicated +ERROR: column "xx" specified more than once CREATE TABLE inhf (LIKE inhx INCLUDING DEFAULTS INCLUDING CONSTRAINTS); INSERT INTO inhf DEFAULT VALUES; SELECT * FROM inhf; /* Single entry with value 'text' */ diff --git a/src/test/regress/expected/plpgsql.out b/src/test/regress/expected/plpgsql.out index 12a6d4e4e4..ddb44a7252 100644 --- a/src/test/regress/expected/plpgsql.out +++ b/src/test/regress/expected/plpgsql.out @@ -1516,7 +1516,7 @@ select * from PField_v1 where pfname = 'PF0_2' order by slotname; -- Finally we want errors -- insert into PField values ('PF1_1', 'should fail due to unique index'); -ERROR: duplicate key violates unique constraint "pfield_name" +ERROR: duplicate key value violates unique constraint "pfield_name" update PSlot set backlink = 'WS.not.there' where slotname = 'PS.base.a1'; ERROR: WS.not.there does not exist CONTEXT: PL/pgSQL function "tg_backlink_a" line 16 at assignment @@ -1530,7 +1530,7 @@ update PSlot set slotlink = 'XX.illegal' where slotname = 'PS.base.a1'; ERROR: illegal slotlink beginning with XX CONTEXT: PL/pgSQL function "tg_slotlink_a" line 16 at assignment insert into HSlot values ('HS', 'base.hub1', 1, ''); -ERROR: duplicate key violates unique constraint "hslot_name" +ERROR: duplicate key value violates unique constraint "hslot_name" insert into HSlot values ('HS', 'base.hub1', 20, ''); ERROR: no manual manipulation of HSlot delete from HSlot; diff --git a/src/test/regress/expected/transactions.out b/src/test/regress/expected/transactions.out index c8fe0522bf..e956bf053a 100644 --- a/src/test/regress/expected/transactions.out +++ b/src/test/regress/expected/transactions.out @@ -463,13 +463,13 @@ BEGIN; NOTICE: CREATE TABLE / UNIQUE will create implicit index "koju_a_key" for table "koju" INSERT INTO koju VALUES (1); INSERT INTO koju VALUES (1); -ERROR: duplicate key violates unique constraint "koju_a_key" +ERROR: duplicate key value violates unique constraint "koju_a_key" rollback to x; CREATE TABLE koju (a INT UNIQUE); NOTICE: CREATE TABLE / UNIQUE will create implicit index "koju_a_key" for table "koju" INSERT INTO koju VALUES (1); INSERT INTO koju VALUES (1); -ERROR: duplicate key violates unique constraint "koju_a_key" +ERROR: duplicate key value violates unique constraint "koju_a_key" ROLLBACK; DROP TABLE foo; DROP TABLE baz; diff --git a/src/test/regress/expected/uuid.out b/src/test/regress/expected/uuid.out index 331a6de5a2..179bf60d98 100644 --- a/src/test/regress/expected/uuid.out +++ b/src/test/regress/expected/uuid.out @@ -106,7 +106,7 @@ CREATE INDEX guid1_hash ON guid1 USING HASH (guid_field); CREATE UNIQUE INDEX guid1_unique_BTREE ON guid1 USING BTREE (guid_field); -- should fail INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-1111-111111111111'); -ERROR: duplicate key violates unique constraint "guid1_unique_btree" +ERROR: duplicate key value violates unique constraint "guid1_unique_btree" -- check to see whether the new indexes are actually there SELECT count(*) FROM pg_class WHERE relkind='i' AND relname LIKE 'guid%'; count diff --git a/src/test/regress/output/constraints.source b/src/test/regress/output/constraints.source index e40c445014..654e8d9953 100644 --- a/src/test/regress/output/constraints.source +++ b/src/test/regress/output/constraints.source @@ -293,7 +293,7 @@ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "primary_tbl_pkey INSERT INTO PRIMARY_TBL VALUES (1, 'one'); INSERT INTO PRIMARY_TBL VALUES (2, 'two'); INSERT INTO PRIMARY_TBL VALUES (1, 'three'); -ERROR: duplicate key violates unique constraint "primary_tbl_pkey" +ERROR: duplicate key value violates unique constraint "primary_tbl_pkey" INSERT INTO PRIMARY_TBL VALUES (4, 'three'); INSERT INTO PRIMARY_TBL VALUES (5, 'one'); INSERT INTO PRIMARY_TBL (t) VALUES ('six'); @@ -337,7 +337,7 @@ NOTICE: CREATE TABLE / UNIQUE will create implicit index "unique_tbl_i_key" for INSERT INTO UNIQUE_TBL VALUES (1, 'one'); INSERT INTO UNIQUE_TBL VALUES (2, 'two'); INSERT INTO UNIQUE_TBL VALUES (1, 'three'); -ERROR: duplicate key violates unique constraint "unique_tbl_i_key" +ERROR: duplicate key value violates unique constraint "unique_tbl_i_key" INSERT INTO UNIQUE_TBL VALUES (4, 'four'); INSERT INTO UNIQUE_TBL VALUES (5, 'one'); INSERT INTO UNIQUE_TBL (t) VALUES ('six'); @@ -361,7 +361,7 @@ INSERT INTO UNIQUE_TBL VALUES (1, 'one'); INSERT INTO UNIQUE_TBL VALUES (2, 'two'); INSERT INTO UNIQUE_TBL VALUES (1, 'three'); INSERT INTO UNIQUE_TBL VALUES (1, 'one'); -ERROR: duplicate key violates unique constraint "unique_tbl_i_key" +ERROR: duplicate key value violates unique constraint "unique_tbl_i_key" INSERT INTO UNIQUE_TBL VALUES (5, 'one'); INSERT INTO UNIQUE_TBL (t) VALUES ('six'); SELECT '' AS five, * FROM UNIQUE_TBL; diff --git a/src/test/regress/output/tablespace.source b/src/test/regress/output/tablespace.source index 8ab6b68f12..607232f535 100644 --- a/src/test/regress/output/tablespace.source +++ b/src/test/regress/output/tablespace.source @@ -48,7 +48,7 @@ ALTER TABLE testschema.atable SET TABLESPACE testspace; ALTER INDEX testschema.anindex SET TABLESPACE testspace; INSERT INTO testschema.atable VALUES(3); -- ok INSERT INTO testschema.atable VALUES(1); -- fail (checks index) -ERROR: duplicate key violates unique constraint "anindex" +ERROR: duplicate key value violates unique constraint "anindex" SELECT COUNT(*) FROM testschema.atable; -- checks heap count ------- |
