Re: Making AFTER triggers act properly in PL functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Making AFTER triggers act properly in PL functions
Date: 2004-09-08 02:12:17
Message-ID: 14384.1094609537@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
> Hmm, if our current state of deferred triggers look like (in order)
> Trigger A
> Trigger B
> Trigger C

> and triggers A and B are made immediate and scanning begins at the
> beginning of the queue again, during the execution of the Trigger A
> trigger function, if an update is done to a table with an immediate after
> trigger (D), does the firing order look like:

> Trigger A start
> Trigger D start
> Trigger D end
> Trigger A end
> Trigger B start
> Trigger B end

Yeah, I would think so.

> What if trigger D calls set constraints to make
> Trigger C immediate?

That would be a query within D, so C would fire within D.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Doug McNaught 2004-09-08 02:21:22 Re: Indexed views?
Previous Message Alvaro Herrera 2004-09-08 01:51:30 Re: Indexed views?