aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-12-28 23:17:09 +0000
committerBruce Momjian <bruce@momjian.us>2005-12-28 23:17:09 +0000
commitb6c881ce6227e239f59e07a177208841b14d1ec6 (patch)
treea9beb7b6ed1d67779a063262af0ce9388de5e760
parentc104cd2038da109a190f4e58d42a54ed6dc8c538 (diff)
downloadpostgresql-b6c881ce6227e239f59e07a177208841b14d1ec6.tar.gz
postgresql-b6c881ce6227e239f59e07a177208841b14d1ec6.zip
Update regression tests for new referential integrity error message
wording ("table" added).
-rw-r--r--src/test/regress/expected/foreign_key.out20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/test/regress/expected/foreign_key.out b/src/test/regress/expected/foreign_key.out
index bb48bfd3afa..5424731d4d0 100644
--- a/src/test/regress/expected/foreign_key.out
+++ b/src/test/regress/expected/foreign_key.out
@@ -307,7 +307,7 @@ SELECT * FROM PKTABLE;
-- Delete a row from PK TABLE (should fail)
DELETE FROM PKTABLE WHERE ptest1=1;
-ERROR: update or delete on "pktable" violates foreign key constraint "fktable_ftest1_fkey" on "fktable"
+ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable"
DETAIL: Key (ptest1)=(1) is still referenced from table "fktable".
-- Delete a row from PK TABLE (should succeed)
DELETE FROM PKTABLE WHERE ptest1=5;
@@ -323,7 +323,7 @@ SELECT * FROM PKTABLE;
-- Update a row from PK TABLE (should fail)
UPDATE PKTABLE SET ptest1=0 WHERE ptest1=2;
-ERROR: update or delete on "pktable" violates foreign key constraint "fktable_ftest1_fkey" on "fktable"
+ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable"
DETAIL: Key (ptest1)=(2) is still referenced from table "fktable".
-- Update a row from PK TABLE (should succeed)
UPDATE PKTABLE SET ptest1=0 WHERE ptest1=4;
@@ -373,13 +373,13 @@ SELECT * from FKTABLE;
-- Try to update something that should fail
UPDATE PKTABLE set ptest2=5 where ptest2=2;
-ERROR: update or delete on "pktable" violates foreign key constraint "constrname3" on "fktable"
+ERROR: update or delete on table "pktable" violates foreign key constraint "constrname3" on table "fktable"
DETAIL: Key (ptest1,ptest2,ptest3)=(1,2,3) is still referenced from table "fktable".
-- Try to update something that should succeed
UPDATE PKTABLE set ptest1=1 WHERE ptest2=3;
-- Try to delete something that should fail
DELETE FROM PKTABLE where ptest1=1 and ptest2=2 and ptest3=3;
-ERROR: update or delete on "pktable" violates foreign key constraint "constrname3" on "fktable"
+ERROR: update or delete on table "pktable" violates foreign key constraint "constrname3" on table "fktable"
DETAIL: Key (ptest1,ptest2,ptest3)=(1,2,3) is still referenced from table "fktable".
-- Try to delete something that should work
DELETE FROM PKTABLE where ptest1=2;
@@ -849,12 +849,12 @@ insert into pktable(base1) values (3);
insert into fktable(ftest1) values (3);
-- let's try removing a row that should fail from pktable
delete from pktable where base1>2;
-ERROR: update or delete on "pktable" violates foreign key constraint "fktable_ftest1_fkey" on "fktable"
+ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable"
DETAIL: Key (base1)=(3) is still referenced from table "fktable".
-- okay, let's try updating all of the base1 values to *4
-- which should fail.
update pktable set base1=base1*4;
-ERROR: update or delete on "pktable" violates foreign key constraint "fktable_ftest1_fkey" on "fktable"
+ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable"
DETAIL: Key (base1)=(3) is still referenced from table "fktable".
-- okay, let's try an update that should work.
update pktable set base1=base1*4 where base1<3;
@@ -877,12 +877,12 @@ insert into pktable(base1,ptest1) values (3, 1);
insert into fktable(ftest1, ftest2) values (3, 1);
-- let's try removing a row that should fail from pktable
delete from pktable where base1>2;
-ERROR: update or delete on "pktable" violates foreign key constraint "fktable_ftest1_fkey" on "fktable"
+ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable"
DETAIL: Key (base1,ptest1)=(3,1) is still referenced from table "fktable".
-- okay, let's try updating all of the base1 values to *4
-- which should fail.
update pktable set base1=base1*4;
-ERROR: update or delete on "pktable" violates foreign key constraint "fktable_ftest1_fkey" on "fktable"
+ERROR: update or delete on table "pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable"
DETAIL: Key (base1,ptest1)=(3,1) is still referenced from table "fktable".
-- okay, let's try an update that should work.
update pktable set base1=base1*4 where base1<3;
@@ -907,11 +907,11 @@ ERROR: insert or update on table "pktable" violates foreign key constraint "pkt
DETAIL: Key (base2,ptest2)=(3,2) is not present in table "pktable".
-- fails (2,2) is being referenced
delete from pktable where base1=2;
-ERROR: update or delete on "pktable" violates foreign key constraint "pktable_base2_fkey" on "pktable"
+ERROR: update or delete on table "pktable" violates foreign key constraint "pktable_base2_fkey" on table "pktable"
DETAIL: Key (base1,ptest1)=(2,2) is still referenced from table "pktable".
-- fails (1,1) is being referenced (twice)
update pktable set base1=3 where base1=1;
-ERROR: update or delete on "pktable" violates foreign key constraint "pktable_base2_fkey" on "pktable"
+ERROR: update or delete on table "pktable" violates foreign key constraint "pktable_base2_fkey" on table "pktable"
DETAIL: Key (base1,ptest1)=(1,1) is still referenced from table "pktable".
-- this sequence of two deletes will work, since after the first there will be no (2,*) references
delete from pktable where base2=2;