Re: Trigger firing order

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Alex Bolenok" <abolen(at)chat(dot)ru>
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Trigger firing order
Date: 2000-11-30 03:00:38
Message-ID: 3318.975553238@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Alex Bolenok" <abolen(at)chat(dot)ru> writes:
> peroon=# INSERT INTO t_foo (foo_value) VALUES (2000);
> NOTICE: fn_foo_ains: Start
> NOTICE: fn_foo_ains: End
> NOTICE: fn_bar_ains: Start
> NOTICE: fn_bar_ains: End

Looking at the code, it seems that all AFTER triggers are implicitly
handled as DEFERRED triggers, ie, they're queued up and executed at
end of statement. This seems wrong to me --- DEFERRED mode is useful,
certainly, but it shouldn't be the only form of AFTER trigger.

Also, it'd seem to me that DEFERRED mode ought to mean defer till end
of transaction, not just end of statement...

Jan, any comments here?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Wooi K. 2000-11-30 06:21:45 calling plsql functions
Previous Message Larry Rosenman 2000-11-30 02:26:00 Re: Bug? 'psql -l' in pg_ctl?