Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1thsGe-007uPi-PL for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Feb 2025 15:33:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1thsGd-00C0tD-DW for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Feb 2025 15:33:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1thsGd-00C0t3-4u for pgsql-bugs@lists.postgresql.org; Tue, 11 Feb 2025 15:33:43 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1thsGb-000EfJ-06 for pgsql-bugs@lists.postgresql.org; Tue, 11 Feb 2025 15:33:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 51BFXcfW2927187; Tue, 11 Feb 2025 10:33:38 -0500 From: Tom Lane To: marko@joh.to cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18803: ERROR: wrong varnullingrels (b) (expected (b 4)) for Var 2/1 In-reply-to: <18803-27d209f78dff2d2b@postgresql.org> References: <18803-27d209f78dff2d2b@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Tue, 11 Feb 2025 14:15:51 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2927185.1739288018.1@sss.pgh.pa.us> Date: Tue, 11 Feb 2025 10:33:38 -0500 Message-ID: <2927186.1739288018@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form 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