Re: ERROR: wrong varnullingrels (b 3) (expected (b)) for Var 2/1
От | Richard Guo |
---|---|
Тема | Re: ERROR: wrong varnullingrels (b 3) (expected (b)) for Var 2/1 |
Дата | |
Msg-id | CAMbWs48qRX9P=YybwaXEWgX+ZR-SU_PLMUHRKRA4Y9pLewYtbQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: ERROR: wrong varnullingrels (b 3) (expected (b)) for Var 2/1 (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: ERROR: wrong varnullingrels (b 3) (expected (b)) for Var 2/1
|
Список | pgsql-hackers |
On Sat, Jun 10, 2023 at 12:08 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Richard Guo <guofenglinux@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
place to do this adjustments. +1 to v2 patch.
Thanks
Richard
В списке pgsql-hackers по дате отправления: