Re: BUG #18803: ERROR: wrong varnullingrels (b) (expected (b 4)) for Var 2/1

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: marko@joh.to
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-02-11T15:33:38Z
Lists: pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> Given this schema:
> ...
> Running this query:
> ...
> produces the following error:
> ERROR:  wrong varnullingrels (b) (expected (b 4)) for Var 2/1

Thanks for the clear report!  We've seen a few variants of this,
and apparently yours is among the cases that are recently fixed.
Trying this example on a fresh 16-tip build (more or less 16.7)
just emits

DO

			regards, tom lane