Search Postgresql Archives

Re: PostgreSQL trigger execution order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alban,

Thanks again for your response.

On Tue, Jul 06, 2010 at 11:57:14AM +0200, Alban Hertroys wrote:
> On 6 Jul 2010, at 11:33, Sebastian Ritter wrote:
> 
> > In what order will the triggers be executed?
> > 
> > Will it be:
> > 
> > INSERT row
> > INVOKE TRIGGER A (First call)
> > INVOKE TRIGGER B (First call) -> INSERT row 
> >                                 INVOKE TRIGGER A (Second call)
> >                                 INVOKE TRIGGER B (let say no new insert)
> >                                 INVOKE TRIGGER C (Second call)
> >                                 INVOKE TRIGGER D (Second call)
> > INVOKE TRIGGER C (First call)
> > INVOKE TRIGGER D (First call)
> > 
> > Or will it be:
> > 
> > INVOKE TRIGGER A (First call)
> > INVOKE TRIGGER B (First call) -> INSERT row and wait...
> 
> Wait for what exactly? You seem to expect some kind of external event here.

'wait...' for the first invocation of trigger C and D to finish before
starting the second round of invocations A-D.

> 
> > INVOKE TRIGGER C (First call)
> > INVOKE TRIGGER D (First call)
> > 
> > INVOKE TRIGGER A (Second call)
> > INVOKE TRIGGER B (let say no new insert)
> > INVOKE TRIGGER C (Second call)
> > INVOKE TRIGGER D (Second call)
> > 

As you suggested in your response, I think the first scenario is
happening. 

Regards,
Seb

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux