Re: Making Vars outer-join aware

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: Making Vars outer-join aware
Дата
Msg-id CAMbWs49iXxG=Br9CcvntrN5X1MVnu-SEP0SosfbcnBvrgqVipA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Making Vars outer-join aware  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Making Vars outer-join aware
Список pgsql-hackers

On Thu, Aug 25, 2022 at 5:18 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Richard Guo <guofenglinux@gmail.com> writes:
> Do we need to also
> generate two SpecialJoinInfos for the B/C join in the first order, with
> and without the A/B join in its min_lefthand?

No, the SpecialJoinInfos would stay as they are now.  It's already the
case that the first join's min_righthand would contain only B, and
the second one's min_righthand would contain only C.
 
I'm not sure if I understand it correctly. If we are given the first
order from the parser, the SpecialJoinInfo for the B/C join would have
min_lefthand as containing both B and the A/B join. And this
SpecialJoinInfo would make the B/C join be invalid, which is not what we
want. Currently the patch resolves this by explicitly running
remove_unneeded_nulling_relids, and the A/B join would be removed from
B/C join's min_lefthand, if Pbc is strict for B.

Do we still need this kind of fixup if we are to keep just one form of
SpecialJoinInfo and two forms of RestrictInfos?

Thanks
Richard

В списке pgsql-hackers по дате отправления: