Re: havingQual vs hasHavingQual buglets
От
Etsuro Fujita
Тема
Re: havingQual vs hasHavingQual buglets
Дата
Msg-id
CAPmGK14uQdQbsv1LSQ5GdxyqNddhceseEjd7-zojXOBQdSmkWQ@mail.gmail.com
Ответ на
Re: havingQual vs hasHavingQual buglets (Richard Guo)
Список
Дерево обсуждения
havingQual vs hasHavingQual buglets Tom Lane <tgl@sss.pgh.pa.us>
Re: havingQual vs hasHavingQual buglets Richard Guo <guofenglinux@gmail.com>
Re: havingQual vs hasHavingQual buglets Etsuro Fujita <etsuro.fujita@gmail.com>
Re: havingQual vs hasHavingQual buglets Tom Lane <tgl@sss.pgh.pa.us>
On Tue, Oct 18, 2022 at 9:47 AM Richard Guo wrote: > On Tue, Oct 18, 2022 at 5:37 AM Tom Lane wrote: >> I came across a couple of places in the planner that are checking >> for nonempty havingQual; but since these bits run after >> const-simplification of the HAVING clause, that produces the wrong >> answer for a constant-true HAVING clause (which'll be folded to >> empty). Correct code is to check root->hasHavingQual instead. The postgres_fdw bits would be my oversight. :-( > +1. root->hasHavingQual is set before we do any expression > preprocessing. It should be the right one to check with. +1 HEAD only seems reasonable. Best regards, Etsuro Fujita
В списке pgsql-hackers по дате отправления
От: houzj.fnst@fujitsu.com
Дата: