Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb6c881c

Browse files
committed
Update regression tests for new referential integrity error message
wording ("table" added).
1 parentc104cd2 commitb6c881c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎src/test/regress/expected/foreign_key.out

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ SELECT * FROM PKTABLE;
307307

308308
-- Delete a row from PK TABLE (should fail)
309309
DELETE FROM PKTABLE WHERE ptest1=1;
310-
ERROR: update or delete on "pktable" violates foreign key constraint "fktable_ftest1_fkey" on "fktable"
310+
ERROR: update or delete ontable"pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable"
311311
DETAIL: Key (ptest1)=(1) is still referenced from table "fktable".
312312
-- Delete a row from PK TABLE (should succeed)
313313
DELETE FROM PKTABLE WHERE ptest1=5;
@@ -323,7 +323,7 @@ SELECT * FROM PKTABLE;
323323

324324
-- Update a row from PK TABLE (should fail)
325325
UPDATE PKTABLE SET ptest1=0 WHERE ptest1=2;
326-
ERROR: update or delete on "pktable" violates foreign key constraint "fktable_ftest1_fkey" on "fktable"
326+
ERROR: update or delete ontable"pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable"
327327
DETAIL: Key (ptest1)=(2) is still referenced from table "fktable".
328328
-- Update a row from PK TABLE (should succeed)
329329
UPDATE PKTABLE SET ptest1=0 WHERE ptest1=4;
@@ -373,13 +373,13 @@ SELECT * from FKTABLE;
373373

374374
-- Try to update something that should fail
375375
UPDATE PKTABLE set ptest2=5 where ptest2=2;
376-
ERROR: update or delete on "pktable" violates foreign key constraint "constrname3" on "fktable"
376+
ERROR: update or delete ontable"pktable" violates foreign key constraint "constrname3" on table "fktable"
377377
DETAIL: Key (ptest1,ptest2,ptest3)=(1,2,3) is still referenced from table "fktable".
378378
-- Try to update something that should succeed
379379
UPDATE PKTABLE set ptest1=1 WHERE ptest2=3;
380380
-- Try to delete something that should fail
381381
DELETE FROM PKTABLE where ptest1=1 and ptest2=2 and ptest3=3;
382-
ERROR: update or delete on "pktable" violates foreign key constraint "constrname3" on "fktable"
382+
ERROR: update or delete ontable"pktable" violates foreign key constraint "constrname3" on table "fktable"
383383
DETAIL: Key (ptest1,ptest2,ptest3)=(1,2,3) is still referenced from table "fktable".
384384
-- Try to delete something that should work
385385
DELETE FROM PKTABLE where ptest1=2;
@@ -849,12 +849,12 @@ insert into pktable(base1) values (3);
849849
insert into fktable(ftest1) values (3);
850850
-- let's try removing a row that should fail from pktable
851851
delete from pktable where base1>2;
852-
ERROR: update or delete on "pktable" violates foreign key constraint "fktable_ftest1_fkey" on "fktable"
852+
ERROR: update or delete ontable"pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable"
853853
DETAIL: Key (base1)=(3) is still referenced from table "fktable".
854854
-- okay, let's try updating all of the base1 values to *4
855855
-- which should fail.
856856
update pktable set base1=base1*4;
857-
ERROR: update or delete on "pktable" violates foreign key constraint "fktable_ftest1_fkey" on "fktable"
857+
ERROR: update or delete ontable"pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable"
858858
DETAIL: Key (base1)=(3) is still referenced from table "fktable".
859859
-- okay, let's try an update that should work.
860860
update pktable set base1=base1*4 where base1<3;
@@ -877,12 +877,12 @@ insert into pktable(base1,ptest1) values (3, 1);
877877
insert into fktable(ftest1, ftest2) values (3, 1);
878878
-- let's try removing a row that should fail from pktable
879879
delete from pktable where base1>2;
880-
ERROR: update or delete on "pktable" violates foreign key constraint "fktable_ftest1_fkey" on "fktable"
880+
ERROR: update or delete ontable"pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable"
881881
DETAIL: Key (base1,ptest1)=(3,1) is still referenced from table "fktable".
882882
-- okay, let's try updating all of the base1 values to *4
883883
-- which should fail.
884884
update pktable set base1=base1*4;
885-
ERROR: update or delete on "pktable" violates foreign key constraint "fktable_ftest1_fkey" on "fktable"
885+
ERROR: update or delete ontable"pktable" violates foreign key constraint "fktable_ftest1_fkey" on table "fktable"
886886
DETAIL: Key (base1,ptest1)=(3,1) is still referenced from table "fktable".
887887
-- okay, let's try an update that should work.
888888
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
907907
DETAIL: Key (base2,ptest2)=(3,2) is not present in table "pktable".
908908
-- fails (2,2) is being referenced
909909
delete from pktable where base1=2;
910-
ERROR: update or delete on "pktable" violates foreign key constraint "pktable_base2_fkey" on "pktable"
910+
ERROR: update or delete ontable"pktable" violates foreign key constraint "pktable_base2_fkey" on table "pktable"
911911
DETAIL: Key (base1,ptest1)=(2,2) is still referenced from table "pktable".
912912
-- fails (1,1) is being referenced (twice)
913913
update pktable set base1=3 where base1=1;
914-
ERROR: update or delete on "pktable" violates foreign key constraint "pktable_base2_fkey" on "pktable"
914+
ERROR: update or delete ontable"pktable" violates foreign key constraint "pktable_base2_fkey" on table "pktable"
915915
DETAIL: Key (base1,ptest1)=(1,1) is still referenced from table "pktable".
916916
-- this sequence of two deletes will work, since after the first there will be no (2,*) references
917917
delete from pktable where base2=2;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp