Thread: trigger firing order

trigger firing order

From
Hugo
Date:
Hi, how can I tell in which order are triggered different triggers on the same table, let me explain ,
I have three triggers for table A, all of then are intended for "before insert" on the table, in ASA I can tell the Db in which order I want the triggers to fire, is there an equivalent for postgres ??

thanks for your help

Postgres  8.0.4
Windows XP



Re: trigger firing order

From
Richard Broersma Jr
Date:
> Hi, how can I tell in which order are triggered different triggers on the
> same table, let me explain ,
> I have three triggers for table A, all of then are intended for "before
> insert" on the table, in ASA I can tell the Db in which order I want the
> triggers to fire, is there an equivalent for postgres ??

IIRC, I've read some where that they are activated in alphabetical order.

Regards,

Richard.

Re: trigger firing order

From
Terry Lee Tucker
Date:
On Monday 10 April 2006 05:09 pm, Hugo saith:
> Hi, how can I tell in which order are triggered different triggers on the
> same table, let me explain ,
> I have three triggers for table A, all of then are intended for "before
> insert" on the table, in ASA I can tell the Db in which order I want the
> triggers to fire, is there an equivalent for postgres ??
>
> thanks for your help
>
> Postgres  8.0.4
> Windows XP

Triggers of the same type fire in alphabetical order; at least, that's how it
works is 7.4.6.

Re: trigger firing order

From
Geoffrey
Date:
Terry Lee Tucker wrote:
> On Monday 10 April 2006 05:09 pm, Hugo saith:
>> Hi, how can I tell in which order are triggered different triggers on the
>> same table, let me explain ,
>> I have three triggers for table A, all of then are intended for "before
>> insert" on the table, in ASA I can tell the Db in which order I want the
>> triggers to fire, is there an equivalent for postgres ??
>>
>> thanks for your help
>>
>> Postgres  8.0.4
>> Windows XP
>
> Triggers of the same type fire in alphabetical order; at least, that's how it
> works is 7.4.6.

Although, you should really be on at LEAST 7.4.12... :)

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>


--
Until later, Geoffrey

Any society that would give up a little liberty to gain a little
security will deserve neither and lose both.  - Benjamin Franklin

Re: trigger firing order

From
Alban Hertroys
Date:
Hugo wrote:
> Hi, how can I tell in which order are triggered different triggers on the
> same table, let me explain ,
> I have three triggers for table A, all of then are intended for "before
> insert" on the table, in ASA I can tell the Db in which order I want the
> triggers to fire, is there an equivalent for postgres ??

They're fired in alphabetical order. I tend to prefix my trigger names
with numbers for that reason ;)

--
Alban Hertroys
alban@magproductions.nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
    7500 AK Enschede

// Integrate Your World //