From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Stef Telford <stef@chronozon.artofdns.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Referential Integrity Question (Delete/Insert during Transaction)
Date: Mon, 18 Jun 2001 15:59:25 -0700 (PDT)
Message-ID: <Pine.BSF.4.21.0106181557230.87232-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <01061816431601.11299@chronozon.artofdns.com>
On Mon, 18 Jun 2001, Stef Telford wrote:
>
> I seem to have hit what i -think- may be a bug (but i am not crying
> wolf jst yet ;).
>
> I have three tables. action, client and order_details. action has a primary
> key 'order', client references action (along with adding the client_id as
> part of its primary key), order_details references client (both parts of the
> primary key there). all foreign keys (order in client and order+client_id in
> order_details) are set to INITIALLY DEFERRED. so far so good i hope.
>
> Now. the way i understand it, shouldnt the integrity of any foreign keys
> be checked at the -end- of the transaction, after all the commands have been
> processed ? it seems that the DELETE is being processed and rejected, but
> the foreign key would be 'okay' due to the following INSERT. I have tried
> SET CONSTRAINTS as well with no difference :\
Yes. There's a problem where intermediate conditions are being checked in
certain sequences of deferred constraints. It should be fixed for 7.2.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, stef@chronozon.artofdns.com
Subject: Re: Referential Integrity Question (Delete/Insert during Transaction)
In-Reply-To: <Pine.BSF.4.21.0106181557230.87232-100000@megazone23.bigpanda.com>
References: <01061816431601.11299@chronozon.artofdns.com> <Pine.BSF.4.21.0106181557230.87232-100000@megazone23.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox