Skip site navigation (1) Skip section navigation (2)


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: (view raw, whole thread or download thread mbox)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group