BUG #1682: subselect generates multiple rows

Поиск
Список
Период
Сортировка
От D.J. Kniep
Тема BUG #1682: subselect generates multiple rows
Дата
Msg-id 20050527075550.57E88F0B12@svr2.postgresql.org
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: evgeny gridasov
Дата:
Сообщение: INSERT deadlocks (bug or feature?)
Следующее
От: shd@t2.technion.ac.il
Дата:
Сообщение: adding users to sshd