Re: execute trigger after another one

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: execute trigger after another one
Date: 2014-12-04 22:46:58
Message-ID: 1417733218981-5829311.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Carlos Carcamo 2014-12-04 23:11:15 Re: execute trigger after another one
Previous Message Carlos Carcamo 2014-12-04 22:38:43 execute trigger after another one