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.