Skip site navigation (1) Skip section navigation (2)

Re: Referential integrity problem postgresql 7.2 ?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>,<pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Referential integrity problem postgresql 7.2 ?
Date: 2002-06-11 19:05:42
Message-ID: 20020611115952.X81107-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
On Tue, 11 Jun 2002, Tom Lane wrote:

> Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)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. :)



In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2002-06-11 19:27:22
Subject: Re: Referential integrity problem postgresql 7.2 ?
Previous:From: Tom LaneDate: 2002-06-11 18:43:17
Subject: Re: Referential integrity problem postgresql 7.2 ?

pgsql-bugs by date

Next:From: Tom LaneDate: 2002-06-11 19:27:22
Subject: Re: Referential integrity problem postgresql 7.2 ?
Previous:From: Tom LaneDate: 2002-06-11 18:43:17
Subject: Re: Referential integrity problem postgresql 7.2 ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group