----- "Tom Lane" <[EMAIL PROTECTED]> wrote:

> Adrian Klaver <[EMAIL PROTECTED]> writes:
> > The problem as far as I can tell is tuple visibility.
> 
> Sort of: the triggers on commandeligne fire (and update the commande
> row)
> at completion of the DELETE command inside p_commande_bd.  This means
> that by the time control returns from that trigger, the tuple version
> that was targeted for deletion is already dead, so there's nothing to
> do.  It doesn't chain up to the newer version of the row.
> 

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.


>                       regards, tom lane


Adrian Klaver
[EMAIL PROTECTED]


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to