Re: Making Vars outer-join aware

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

On Thu, Aug 25, 2022 at 6:27 PM Richard Guo <guofenglinux@gmail.com> wrote:
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. 
 
Now I see how this works from v6 patch.  Once we notice identity 3
applies, we will remove the lower OJ's ojrelid from the min_lefthand or
min_righthand so that the commutation is allowed.  So in this case, the
A/B join would be removed from B/C join's min_lefthand when we build the
SpecialJoinInfo for B/C join, and that makes the B/C join to be legal.

BTW, inner_join_rels can contain base Relids and OJ Relids.  Maybe we
can revise the comments a bit for it atop deconstruct_recurse and
make_outerjoininfo.  The same for the comments of qualscope, ojscope and
outerjoin_nonnullable atop distribute_qual_to_rels.

The README mentions restriction_is_computable_at(), I think it should be
clause_is_computable_at().

Thanks
Richard

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

Предыдущее
От: Juan José Santamaría Flecha
Дата:
Сообщение: Re: WIN32 pg_import_system_collations
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Printing backtrace of postgres processes