Re: Trigger Firing Order - Mailing list pgsql-general

From Kevin Grittner
Subject Re: Trigger Firing Order
Date
Msg-id 1386776900.86253.YahooMailNeo@web162901.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: Trigger Firing Order  (Sameer Kumar <sameer.kumar@ashnik.com>)
Responses Re: Trigger Firing Order  (Sameer Kumar <sameer.kumar@ashnik.com>)
List pgsql-general
Sameer Kumar <sameer.kumar@ashnik.com> wrote:

> If I have a trigger which add primary key to my inserted row
> ("before trigger"). Now if I plan to create new set of triggers
> for AUDITING or replication (where either I have no flexibility
> of choosing a name or the trigger name has to follow a standard),
> then I need to change all my existing triggers and rename them.

You have auditing or replication triggers that fire as BEFORE
triggers?  What do they do if a subsequent trigger further modifies
the operation before the statement is applied to the database?
(Obviously, all BEFORE triggers fire before the statement is
applied, and all AFTER triggers fire after the statement is
applied, so naming can never cause an AFTER trigger to fire before
a BEFORE trigger.)

> I was going to propose to work on developing an additional clause
> "ORDER n" for CREATE TRIGGER statement. Triggers with lowest
> order gets called first.

I just include a 3 digit number as part of my trigger names.  Why
is that harder than adding a new clause to the CREATE TRIGGER
statement?

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-general by date:

Previous
From: salah jubeh
Date:
Subject: Re: Convert table to view 9.1
Next
From: Tom Lane
Date:
Subject: Re: Convert table to view 9.1