Re: What Is The Firing Order?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, cnliou(at)eurosport(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: What Is The Firing Order?
Date: 2001-09-07 20:01:46
Message-ID: 200109072001.f87K1kv20378@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > That seems fairly arbitrary; someone else might wish the opposite,
> > depending on the details of what they want to do.
>
> We should probably check first whether the SQL standard has anything to
> say about the relative ordering of foreign key cascade actions versus
> triggers. (I would tend to think that triggers come after FK actions.
> However, things might get tricky when cascade actions fire triggers of
> their own.)
>
> The order of execution of "pure" triggers meanwhile is defined thus:
>
> The order of execution of a set of triggers is ascending by value
> of their timestamp of creation in their descriptors, such that the
> oldest trigger executes first. If one or more triggers have the
> same timestamp value, then their relative order of execution is
> implementation-defined. [4.35]
>
> This is probably what happens in practice anyway, so it might make sense
> to follow this rule.

Yep, that would be a pretty strong vote for OID order.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alex Pilosov 2001-09-07 20:03:59 Re: moving char() to varchar()
Previous Message Brent R. Matzelle 2001-09-07 19:54:58 Re: moving char() to varchar()