Re: Controling Rule's Firing Order - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Controling Rule's Firing Order
Date
Msg-id 20020823201858.T27845-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Controling Rule's Firing Order  (cn <cnliou@eurosport.com>)
List pgsql-general
On Sat, 24 Aug 2002, cn wrote:

> Hello! Tom,
>
> Thank you very much for the patience! Probably you are my last hope.
>
> > Foreign key triggers will fire in alphabetical order along with other triggers.
> > This means they're firing based on a textual sort of the OIDs assigned to the
> > triggers, which will often but not always correspond to creation order.
>
> I don't fully understand the meaning of the term "firing in alphabetic
> order" you mentioned earlier and "they're firing based on a textual sort
> of the OIDs assigned to the triggers". OIDs are integers. Why terms
> "textual" and "alphabetic" are used?  Did you actually referring them to
> the _names_ of triggers, rules, and FK triggers, instead of their OIDs?

The name of a foreign key trigger is a constant beginning followed by an
oid.

> Now back to the topic of your concern about the value of controling FK
> trigger's firing order. I have prepared this example trying to prove
> that they are worthy being added to the already very powerful
> postgresql. I want the system to work in this way:

You can't easily control which foreign key trigger runs first, but you
should be able to make triggers run before/after the foreign
key trigger by picking names before/after the constant part of the
fk trigger name.  I'm not sure how triggers fired from statements
within trigger functions would play into that however.


pgsql-general by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: PostgreSQL 7.2.2: Security Release
Next
From: Alvaro Herrera
Date:
Subject: Re: Controling Rule's Firing Order