Achilleus Mantzios <[EMAIL PROTECTED]> writes:
> CREATE RULE handle_delete_on_kid AS ON DELETE TO kid WHERE 
>   (NOT old.onlythis) DO INSTEAD DELETE FROM parent 
>   WHERE (parent.id = old.parid);

Bear in mind that the DELETEs issued by the ON DELETE CASCADE trigger
will be rewritten by this same rule.

There has been debate in the past whether this behavior is a feature or
a bug, but it's unlikely to change soon.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to