Re: ERROR: wrong varnullingrels (b 3) (expected (b)) for Var 2/1

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Markus Winand <markus.winand@winand.at>, pgsql-hackers@postgresql.org
Date: 2023-06-13T22:02:58Z
Lists: pgsql-hackers
I wrote:
> Richard Guo <guofenglinux@gmail.com> writes:
>> Oh, wait ... It occurred to me that we may have this same issue with
>> Memoize cache keys.

> Good catch --- I'll take a closer look tomorrow.

Pushed after a little more fiddling with the comments.

			regards, tom lane



Commits

  1. Don't include outer join relids in lateral_relids bitmapsets.

  2. Centralize fixups for mismatched nullingrels in nestloop params.

  3. Fix "wrong varnullingrels" for Memoize's lateral references, too.

  4. Fix "wrong varnullingrels" for subquery nestloop parameters.