Re: Foreign key trigger timing bug?

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Foreign key trigger timing bug?
Date: 2005-12-07 21:50:59
Message-ID: 20051207134621.V49571@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-12-07 21:59:14 Reducing contention for the LockMgrLock
Previous Message Simon Riggs 2005-12-07 21:24:05 Inherited Constraints