Adrian Klaver <aklaver(at)comcast(dot)net> writes:
> Thanks for the explanation. Just so I am clear,the act of updating the row in p_commandeligne_ad creates a new tuple for the row with id of 1. This means the original statement "delete from commande where id=1" runs against a version of the row that no longer exists and becomes a no-op statement. This happens because the trigger was run as BEFORE and changed the row from under the original statement.
Right.
regards, tom lane