Re:

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: joacher(at)gmx(dot)de
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re:
Date: 2003-07-31 04:00:44
Message-ID: 27478.1059624044@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

joacher(at)gmx(dot)de writes:
> Now, the user-called function executes several INSERTS at once, and
> the trigger also is fired several times, but AFTER the complete
> function is done, and not after each specific INSERT, as I expected.

AFTER triggers fire at the end of the SQL statement.

Presently this is taken to mean "at the end of the complete interactive
statement", ie, just before we go back to waiting for client input.
There has been some discussion of changing it so that when an INSERT
(resp. UPDATE or DELETE) is done within a function, any triggers fired
are executed at completion of that statement before proceeding with the
function. We've not made the change yet though.

regards, tom lane

In response to

  • at 2003-07-31 00:15:59 from joacher

Browse pgsql-bugs by date

  From Date Subject
Next Message Philipp Reisner 2003-07-31 08:09:50 Re: Postgresql 7.3.3 crashing on query
Previous Message Bruce Momjian 2003-07-31 02:12:46 Re: Small problem in contrib/dbase/dbf2pg.c