Severe SUBSELECT bug in 6.5 CVS

From: Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com>
To: pgsql-hackers(at)hub(dot)org
Subject: Severe SUBSELECT bug in 6.5 CVS
Date: 1999-06-25 14:58:20
Message-ID: 3773990C.B58264C1@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-ports pgsql-sql

Using the very latest CVS I'm encountering a bug in SUBSELECTs.
This query returns 22 rows...

SELECT id,title FROM question;

This query returns 15 rows...

SELECT id,title FROM question WHERE question.id IN (SELECT webobject
FROM comment);

Therefore I would expect this query to return 7 rows. Instead it returns
none....

SELECT id,title FROM question WHERE question.id NOT IN (SELECT webobject
FROM comment);

I've tried it with a newly dumped and created database and it still
happens. However I can't get it to happen on a new and empty database
with simple data. In other words I can't come up with a simple test
case. All I can think to do therefore is put my data in a file for
download. It is 100k.

ftp://ftp.tech.com.au/pub/datadump.gz

As an aside, while creating this dump I tried to load it into another
database and drop a few tables to make it smaller. I then tried to dump
it again and got the following error...

dumpRules(): SELECT failed for table productv. Explanation from
backend: 'ERROR: cache lookup of attribute 1 in relation 1864370 failed

--
Chris Bitmead
mailto:chris(at)tech(dot)com(dot)au

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-06-25 15:37:03 Re: AW: [HACKERS] fsynch of pg_log write..
Previous Message Zeugswetter Andreas IZ5 1999-06-25 14:10:19 AW: [HACKERS] fsynch of pg_log write..

Browse pgsql-ports by date

  From Date Subject
Next Message Unprivileged user 1999-06-25 15:24:11 Port Bug Report: JDBC dosn't work correctly under IBM's JDK 1.1.7
Previous Message Unprivileged user 1999-06-25 13:14:01 Port Bug Report: triggers are not loading 'c' functions

Browse pgsql-sql by date

  From Date Subject
Next Message Jim Rowan 1999-06-25 20:48:25 Re: [HACKERS] Re: trouble creating log table with rules
Previous Message Jan Wieck 1999-06-25 12:09:28 Re: [HACKERS] Re: trouble creating log table with rules