On Sat, Jun 10, 2023 at 12:08 AM Tom Lane <t...@sss.pgh.pa.us> wrote:

> Richard Guo <guofengli...@gmail.com> writes:
> > We can identify in which form of identity 3 the plan is built up by
> > checking the relids of the B/C join's outer rel.  If it's in the first
> > form, the outer rel's relids must contain the A/B join.  Otherwise it
> > should only contain B's relid.  So I'm considering that maybe we can
> > adjust the nulling bitmap for nestloop parameters according to that.
> > Attached is a patch for that.  Does this make sense?
>
> Hmm.  I don't really want to do it in identify_current_nestloop_params
> because that gets applied to all nestloop params, so it seems like
> that risks masking bugs of other kinds.  I'd rather do it in
> process_subquery_nestloop_params, which we know is only applied to
> subquery LATERAL references.  So more or less as attached.


Yeah, that makes sense.  process_subquery_nestloop_params is a better
place to do this adjustments.  +1 to v2 patch.

Thanks
Richard

Reply via email to