| From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | <pgsql-hackers(at)postgreSQL(dot)org> |
| Subject: | Re: Odd(?) RI-trigger behavior |
| Date: | 2002-04-19 03:09:55 |
| Message-ID: | 20020418200035.R95561-100000@megazone23.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
On Thu, 18 Apr 2002, Tom Lane wrote:
> This particular test involves a table with a foreign-key reference to
> itself, ie, it's both PK and FK. What apparently is happening is that
> the two RI triggers are now being fired in a different order than
> before. While either of them would have detected an error, we now get
> the other error first.
>
> Does this bother anyone? It seems to me that the old code essentially
> had no guarantee at all about the order in which the triggers would
> fire, and so it was pure luck that the regression test never showed
> the other message.
That's probably a bad thing even if I doubt that it'd ever come up the
other way barring changes to other regression tests in practice. Forcing
an order probably helps with this case anyway.
> With the modified code, because we load the triggers by scanning
> an index on (tgrelid, tgname), it is actually true that triggers are
> fired in name order. We've had requests in the past to provide a
> well-defined firing order for triggers --- should we document this
> behavior and support it, or should we pretend it ain't there?
Didn't someone (Peter?) say that the mandated firing order was based on
creation order/time in SQL99?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2002-04-19 03:28:48 | Re: syslog support by default |
| Previous Message | Hiroshi Inoue | 2002-04-19 03:07:54 | Re: timeout implementation issues |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2002-04-19 03:30:26 | Re: Odd(?) RI-trigger behavior |
| Previous Message | Tom Lane | 2002-04-19 02:02:45 | Odd(?) RI-trigger behavior |