Re: [GENERAL] PostgreSQL trigger execution order

2010-07-06 Thread Sebastian Ritter
Hi Alban, I have finally managed to get to the bottom of the problem I was facing. I thought I'd share my findings, as I managed to waste a lot of time trying to solve the problem. As previously mentioned I have several complicated triggers that run after an insert on a given table. Some of the

Re: [GENERAL] PostgreSQL trigger execution order

2010-07-06 Thread Sebastian Ritter
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 TR

Re: [GENERAL] PostgreSQL trigger execution order

2010-07-06 Thread Alban Hertroys
On 6 Jul 2010, at 11:33, Sebastian Ritter wrote: > I have a table with 4 AFTER INSERT triggers defined for a table. > > For example purposes lets call them A,B,C,D. > > I know that they will execute in alphabetical order as per the > PostgreSQL docs. > > However, on occasion, trigger B will c

[GENERAL] PostgreSQL trigger execution order

2010-07-06 Thread Sebastian Ritter
Hi All, I posted a few questions earlier last week about how triggers are executed and wanted to expand on them, if possible. I have a table with 4 AFTER INSERT triggers defined for a table. For example purposes lets call them A,B,C,D. I know that they will execute in alphabetical order as per