Tom Lane wrote:
> The rule that actually deletes the rows from the underlying has to fire
> last, since the rows are gone from the view (and hence from OLD) the
> moment you delete them.

A quote from the postgresql manual:

"But for ON UPDATE and ON DELETE rules, the original query is done after the actions added by rules. This ensures that the actions can see the to-be-updated or to-be-deleted rows"

So, the actual delete should be done after all the rules. And even if it does delete before anything else, that does not explain why "step2" is not inserted into the debuglog table. Or, that all the rules _are_ executed when I call the query with "explain analayze".

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to