Re: Why are triggers semi-deferred? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Why are triggers semi-deferred?
Date
Msg-id 28194.1052150868@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why are triggers semi-deferred?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: Why are triggers semi-deferred?
Re: Why are triggers semi-deferred?
List pgsql-hackers
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> Actually, I think from sql99's description, for after row triggers it
> should happen after the row is modified not after the statement as a
> whole (so given two 2 row updates in a function you'd get
>  update1,row1 afterrow1-1 update1,row2 afterrow1-2,afterstatement1
>  update2,row1 afterrow2-1 update2,row2 afterrow2-2,afterstatement2
> )

[ scratches head ... ]  That seems a useless definition.  What is the
purpose of firing immediately after, rather than immediately before,
a row update?  Wouldn't you want to wait till end of statement so you
know that the whole statement is in fact going to complete (and not
die at some later row)?  What do you have immediately after the update
that you didn't have just before it?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Why are triggers semi-deferred?
Next
From: Tom Lane
Date:
Subject: Re: Why are triggers semi-deferred?