Re: Cascading deletes with rules in 7.0.3: why doesn't this work?
От | Tom Lane |
---|---|
Тема | Re: Cascading deletes with rules in 7.0.3: why doesn't this work? |
Дата | |
Msg-id | 7776.986222247@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Cascading deletes with rules in 7.0.3: why doesn't this work? (Jeremy Radlow <jtr@sourcerers.com>) |
Ответы |
Re: Cascading deletes with rules in 7.0.3: why doesn't this work?
|
Список | pgsql-general |
Jeremy Radlow <jtr@sourcerers.com> writes: > In the following example, I'm trying to log all deletions from any of three > tables. The only information I'm interested in recording is the index from > table A which the deleted row referenced. This seems to be a bug. I haven't finished tracking it down yet, but when you delete from A or B, the ON DELETE CASCADE trigger is going to try to delete from B and/or C as well --- so the trigger will end up invoking the ON DELETE rules for those tables and hence trying to insert into delete_log. This chain of events does indeed happen as expected, but it seems that when we get down to the INSERT, the value being passed for old.ax has become NULL. Something rotten in parameter passing, apparently. (Deletion from C works, because that does not trigger any cascaded deletes.) Thanks for the report! I'll try to fix it for 7.1... regards, tom lane
В списке pgsql-general по дате отправления: