cascade deleting
От | Duan Ligong |
---|---|
Тема | cascade deleting |
Дата | |
Msg-id | 20090522090031.4797.DUANLG@nec-as.nec.com.cn обсуждение исходный текст |
Список | pgsql-general |
Hi. I am wondering whether the following problem can be avoided by using Cascade Deleting while the DB is in Read Committed Isolation Level: In the following scenario, The "DEL item1 from tb_pk" command fails because of involating foreign key constraints. (The tb_fk1, tb_fk2, and tb_fk3 tables reference the tb_pk table) Transaction A Transaction B begin() | | | DEL item1 from tb_fk1 begin() | | DEL item1 from tb_fk2 INS item1 into tb_fk1 | | DEL item1 from tb_fk3 commit() | DEL item1 from tb_pk | |( failed because of involating foreign key constraint.) | commit() My real question is: Will Executing "CASCADE DEL item1 from tb_pk" fail if another transaction insert item1 into tb_fk1 during executing "CASCADE DEL item1 from tb_pk"? Thanks Duan --------------------------------------------------- Duan Ligong E-MAIL : duanlg@nec-as.nec.com.cn Tel : 010-82334433-354 : 8-0086-22-354
В списке pgsql-general по дате отправления: