1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-12 02:37:31 +03:00

Error message editing in backend/access.

This commit is contained in:
Tom Lane
2003-07-21 20:29:40 +00:00
parent c6106d91e2
commit ec7aa4b515
33 changed files with 702 additions and 533 deletions

View File

@@ -475,7 +475,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: Cannot insert a duplicate key into unique index atacc_test1
ERROR: duplicate key violates UNIQUE constraint "atacc_test1"
-- should succeed
insert into atacc1 (test) values (4);
-- try adding a unique oid constraint
@@ -509,7 +509,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: Cannot insert a duplicate key into unique index atacc_test1
ERROR: duplicate key violates UNIQUE constraint "atacc_test1"
-- should all succeed
insert into atacc1 (test,test2) values (4,5);
insert into atacc1 (test,test2) values (5,4);
@@ -523,7 +523,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: Cannot insert a duplicate key into unique index atacc1_test_key
ERROR: duplicate key violates UNIQUE constraint "atacc1_test_key"
drop table atacc1;
-- test primary key constraint adding
create table atacc1 ( test int );
@@ -534,7 +534,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: Cannot insert a duplicate key into unique index atacc_test1
ERROR: duplicate key violates UNIQUE constraint "atacc_test1"
-- should succeed
insert into atacc1 (test) values (4);
-- inserting NULL should fail
@@ -589,7 +589,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: Cannot insert a duplicate key into unique index atacc_test1
ERROR: duplicate key violates UNIQUE constraint "atacc_test1"
insert into atacc1 (test,test2) values (NULL,3);
ERROR: null value for attribute "test" violates NOT NULL constraint
insert into atacc1 (test,test2) values (3, NULL);
@@ -607,7 +607,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: Cannot insert a duplicate key into unique index atacc1_pkey
ERROR: duplicate key violates UNIQUE constraint "atacc1_pkey"
insert into atacc1 (test2, test) values (1, NULL);
ERROR: null value for attribute "test" violates NOT NULL constraint
drop table atacc1;

View File

@@ -363,7 +363,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: Cannot insert a duplicate key into unique index arr_tbl_f1_key
ERROR: duplicate key 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}');

View File

@@ -78,7 +78,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: Cannot insert a duplicate key into unique index func_index_index
ERROR: duplicate key violates UNIQUE constraint "func_index_index"
-- but this shouldn't:
INSERT INTO func_index_heap VALUES('QWERTY');
--
@@ -92,7 +92,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: Cannot insert a duplicate key into unique index func_index_index
ERROR: duplicate key violates UNIQUE constraint "func_index_index"
-- but this shouldn't:
INSERT INTO func_index_heap VALUES('QWERTY');
--

View File

@@ -99,10 +99,10 @@ ERROR: attribute "oid" of relation "stud_emp" already exists
-- not in a xact
abort;
WARNING: ROLLBACK: no transaction in progress
WARNING: there is no transaction in progress
-- not in a xact
end;
WARNING: COMMIT: no transaction in progress
WARNING: there is no transaction in progress
--
-- CREATE AGGREGATE
-- sfunc/finalfunc type disagreement

View File

@@ -1515,7 +1515,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: Cannot insert a duplicate key into unique index pfield_name
ERROR: duplicate key 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
@@ -1529,7 +1529,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: Cannot insert a duplicate key into unique index hslot_name
ERROR: duplicate key violates UNIQUE constraint "hslot_name"
insert into HSlot values ('HS', 'base.hub1', 20, '');
ERROR: no manual manipulation of HSlot
delete from HSlot;

View File

@@ -290,7 +290,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: Cannot insert a duplicate key into unique index primary_tbl_pkey
ERROR: duplicate key 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');
@@ -334,7 +334,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: Cannot insert a duplicate key into unique index unique_tbl_i_key
ERROR: duplicate key 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');
@@ -358,7 +358,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: Cannot insert a duplicate key into unique index unique_tbl_i_key
ERROR: duplicate key 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;