1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-26 23:43:30 +03:00

Back-patch Jan's fix to avoid primary key lookup (and lock) if foreign key

does not change on UPDATE.
This commit is contained in:
Tom Lane
2003-05-21 18:14:46 +00:00
parent af1850fc1a
commit 3284e342a2
2 changed files with 34 additions and 8 deletions

View File

@@ -882,7 +882,7 @@ delete from pktable where base1=2;
ERROR: $1 referential integrity violation - key in pktable still referenced from pktable
-- fails (1,1) is being referenced (twice)
update pktable set base1=3 where base1=1;
ERROR: $1 referential integrity violation - key referenced from pktable not found in pktable
ERROR: $1 referential integrity violation - key in pktable still referenced from pktable
-- this sequence of two deletes will work, since after the first there will be no (2,*) references
delete from pktable where base2=2;
delete from pktable where base1=2;