Re: Making Vars outer-join aware - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Making Vars outer-join aware
Date
Msg-id 1165800.1661375933@sss.pgh.pa.us
Whole thread Raw
In response to Re: Making Vars outer-join aware  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: Making Vars outer-join aware
List pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes:
> On Sun, Aug 21, 2022 at 6:52 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> What I'm thinking we should do about this, once we detect that
>> this identity is applicable, is to generate *both* forms of Pbc,
>> either adding or removing the varnullingrels bits depending on
>> which form we got from the parser.

> Do you mean we generate two RestrictInfos for Pbc in the case of
> identity 3, one with varnullingrels and one without varnullingrels, and
> choose the appropriate one when forming join paths?

Right.

> 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.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: making relfilenodes 56 bits
Next
From: Gurjeet Singh
Date:
Subject: pg_regress: lookup shellprog in $PATH