Re: execute trigger after another one - Mailing list pgsql-general

From David G Johnston
Subject Re: execute trigger after another one
Date
Msg-id 1417733218981-5829311.post@n5.nabble.com
Whole thread Raw
In response to execute trigger after another one  (Carlos Carcamo <eazyduiz@gmail.com>)
Responses Re: execute trigger after another one  (Carlos Carcamo <eazyduiz@gmail.com>)
List pgsql-general
Carlos Carcamo wrote
> I read about order of execution of triggers, is supposed that postgres
> executes triggers in alphabetical order, so I called the plpgsql
> a_trigger and the second one b_trigger (as an example), but it seems
> that the second one always executes first.
>
> Is there any way to make triggers execute in a specific order?

If two triggers would otherwise fire at the same time then alphabetical
order is used to break ties.  But in all situations before triggers will
always fire before after triggers.

But since you haven't show us the exact CREATE TRIGGER statements you are
using whether that is why yours are not behaving is impossible to tell.

Also, you say "it seems" - can you put forth specific proof that one is
firing before the other?

David J.





--
View this message in context: http://postgresql.nabble.com/execute-trigger-after-another-one-tp5829308p5829311.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Carlos Carcamo
Date:
Subject: execute trigger after another one
Next
From: Carlos Carcamo
Date:
Subject: Re: execute trigger after another one