Re: Removing unneeded self joins
От | Alexander Korotkov |
---|---|
Тема | Re: Removing unneeded self joins |
Дата | |
Msg-id | CAPpHfdvu+wyazT+ujJbJ5rKZrHQoG+FCVeWENA4pyf_A1W1WAA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Removing unneeded self joins (Alexander Korotkov <aekorotkov@gmail.com>) |
Ответы |
Re: Removing unneeded self joins
Re: Removing unneeded self joins |
Список | pgsql-hackers |
On Mon, Jan 8, 2024 at 10:20 PM Alexander Korotkov <aekorotkov@gmail.com> wrote: > On Mon, Jan 8, 2024 at 10:00 PM Alexander Lakhin <exclusion@gmail.com> wrote: > > Please look at the following query which produces an incorrect result since > > d3d55ce57: > > CREATE TABLE t(a int PRIMARY KEY, b int); > > INSERT INTO t VALUES (1, 1), (2, 1); > > SELECT * FROM t WHERE EXISTS (SELECT * FROM t t2 WHERE t2.a = t.b AND t2.b > 0); > > > > a | b > > ---+--- > > 1 | 1 > > (1 row) > > > > I think that the expected result is: > > a | b > > ---+--- > > 1 | 1 > > 2 | 1 > > (2 rows) > > Thank you for your report. I'm looking at this now. Fixed in 30b4955a46. ------ Regards, Alexander Korotkov
В списке pgsql-hackers по дате отправления: