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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user