Re: Referential integrity problem postgresql 7.2 ? - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: Referential integrity problem postgresql 7.2 ?
Date
Msg-id 20020611115952.X81107-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Referential integrity problem postgresql 7.2 ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Referential integrity problem postgresql 7.2 ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Tue, 11 Jun 2002, Tom Lane wrote:

> Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> > On Mon, 10 Jun 2002, Stephen R. van den Berg wrote:
> >> ERROR:  <unnamed> referential integrity violation - key referenced
> >> from b not found in a
> >> Or should it work because the check is deferred and in the
> >> end no violations are present?
>
> > It should work (and does in current sources).  If you look in the archives
> > you should be able to get info on how to patch 7.2 (it came up recently,
> > I'm not sure which list, and Tom Lane sent the message in question).
>
> BTW, should we back-patch that into 7.2.*?  I was resistant to the idea
> because of concern about lack of testing, but seeing that we've gotten
> several complaints maybe we should do it anyway.

If we're doing a 7.2.2, it may be worth it. I think that part of the patch
(minus concerns about variables possibly not being reset, etc) is
reasonably safe (and that part could be reasonably looked at again
quickly) and did have some limited testing due to a couple of people
getting the patch back during 7.2's development.

As a related side note.  The other part of the original patch (the NOT
EXISTS in the upd/del no action trigger) was rejected.  For match
full and match unspecified the same result can be reached by doing another
query which may be better than the subquery.  Do you think that'd be
better? I'd like to get the other side of this bug fixed so that at least
the no action cases work reasonably correctly. :)

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Referential integrity problem postgresql 7.2 ?
Next
From: Victor Wagner
Date:
Subject: Re: Referential integrity problem postgresql 7.2 ?