From: | David Johnston <polobo(at)yahoo(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Trigger Firing Order |
Date: | 2013-12-11 04:26:01 |
Message-ID: | 1386735961381-5782800.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Sameer Kumar wrote
> Hi,
>
> Is it possible for me to define the order in which triggers will be fired?
>
> So far what I have understood from PostgreSQL documentation, in order to
> fire 2 triggers in sequence (say trigger1 and trigger2) on a table, I need
> to name them in that way.
> But with certain packaged products who create their own triggers, I won't
> have control over this. Also, this could be an issue for me if I write
> business logic in triggers.
>
> Any better way known to work in PostgreSQL?
If you have sufficient enough rights on the database you can modify the
triggers in whatever way you deem fit. There is currently no alternative
way to specify trigger execution order than alphabetically.
I guess such re-naming could introduce problems with applications but that
is unlikely.
Note, too, that you can leave but disable the existing triggers and define
your own triggers with whatever name you require and simply call the same
function as the existing trigger.
Is this a theoretical question or do you actual have this problem?
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Trigger-Firing-Order-tp5782797p5782800.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-12-11 04:31:21 | Re: Trigger Firing Order |
Previous Message | Michael Paquier | 2013-12-11 04:23:47 | Re: [Postgres-xc-general] "Tuple not found error" during Index creation |