Hi Rick,

So much as I expected. Its probably not a bug, and working exactly as planned.

So my question is how to get the behaviour I want!
I can't use a BEFORE trigger as that doesn't let me delete rows (which is my real use case - the example is a gross simplification). I need to do a join to get the data I need, but the join depends on something that has just been deleted because this is an ON DELETE triger.

Tim


Hi Tim,

This result looks correct to me. The trg_delete2 trigger fires AFTER the
deletion and inside the same transaction. So it sees the state of the
MAIN table AFTER the banana tuple was deleted. From its perspective, the
banana table should not appear in the join.

Or did I misunderstand your question?

Hope this helps,
-Rick


Reply via email to