Re: Foreign key trigger timing bug?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Foreign key trigger timing bug?
Date: 2005-12-09 19:42:53
Message-ID: 200512091942.jB9JgrA25777@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephan Szabo wrote:
> On Wed, 7 Dec 2005, Bruce Momjian wrote:
>
> > I had an open 8.1 item that was:
> >
> > o fix foreign trigger timing issue
> >
> > Would someone supply text for a TODO entry on this, as I don't think we
> > fixed it in 8.1.
>
> I'd split this into two separate items now.
>
> Fix before delete triggers on cascaded deletes to run after the cascaded
> delete is done. This is odd, but seems to be what the spec requires.
>
> Fix problems with referential action caused before triggers that modify
> rows that would also be modified by the referential action. Right now,
> this has a few symptoms, either you can get spurious seeming errors from
> the constraint or you can end up with invalid data in the referencing
> table. As far as I can see, the spec doesn't have much to say about this
> because the spec doesn't seem to allow before triggers to modify tables.

I have updated the CREATE TRIGGER documentation to highlight these
items, and the fact we consider our current behavior on the first item
to be correct.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 1.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Luke Lonergan 2005-12-09 20:39:08 Re: Warm-cache prefetching
Previous Message Tom Lane 2005-12-09 19:27:07 Re: Log of CREATE USER statement