BUG #1682: subselect generates multiple rows - Mailing list pgsql-bugs

From D.J. Kniep
Subject BUG #1682: subselect generates multiple rows
Date
Msg-id 20050527075550.57E88F0B12@svr2.postgresql.org
Whole thread Raw
Responses Re: BUG #1682: subselect generates multiple rows  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: BUG #1682: subselect generates multiple rows  (Michael Fuhr <mike@fuhr.org>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1682
Logged by:          D.J. Kniep
Email address:      dick@kniep.nl
PostgreSQL version: 8.0.3
Operating system:   Linux
Description:        subselect generates multiple rows
Details:

table1:
id         content
1          John Doe
2          Peter Gabriel

view2
id         extra1        extra2
1          a1            b1
1          a1            b1
2          a1            b3
3          a1            b5

query:
select * from table1 t1 where t1.id in (select t2.id from view2 t2 where
extra1 = 'a1')

produces:

id         content
1          John Doe
1          John Doe
2          Peter Gabriel

which obviously should be:

id         content
1          John Doe
2          Peter Gabriel

I might not be reachable on my mailaddress because of US imposed
restrictions. A big range of the IP addresses of the provider I am using are
marked as spam generating (which in fact is NOT true at least not for my IP
address), and blacklisted and this makes it effectively impossible for me to
use the mailinglist.

pgsql-bugs by date:

Previous
From: evgeny gridasov
Date:
Subject: INSERT deadlocks (bug or feature?)
Next
From: shd@t2.technion.ac.il
Date:
Subject: adding users to sshd