BUG #1682: subselect generates multiple rows

From: "D(dot)J(dot) Kniep" <dick(at)kniep(dot)nl>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1682: subselect generates multiple rows
Date: 2005-05-27 07:55:50
Message-ID: 20050527075550.57E88F0B12@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1682
Logged by: D.J. Kniep
Email address: dick(at)kniep(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ilya Konyuhov 2005-05-27 08:03:35 BUG #1683: Error in PQresultErrorField function
Previous Message shd 2005-05-27 00:01:21 adding users to sshd