Re: - Mailing list pgsql-bugs

From Tom Lane
Subject Re:
Date
Msg-id 27478.1059624044@sss.pgh.pa.us
Whole thread Raw
In response to  (joacher@gmx.de)
List pgsql-bugs
joacher@gmx.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

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Small problem in contrib/dbase/dbf2pg.c
Next
From: Philipp Reisner
Date:
Subject: Re: Postgresql 7.3.3 crashing on query