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 1tGhBP-0008rD-2c for pgsql-general@arkaria.postgresql.org; Thu, 28 Nov 2024 16:15:59 +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 1tGhBN-0064td-K4 for pgsql-general@arkaria.postgresql.org; Thu, 28 Nov 2024 16:15:57 +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 1tGhBN-0064tV-9e for pgsql-general@lists.postgresql.org; Thu, 28 Nov 2024 16:15:57 +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.94.2) (envelope-from ) id 1tGhBK-00014I-PP for pgsql-general@postgresql.org; Thu, 28 Nov 2024 16:15:56 +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 4ASGFoW12090951; Thu, 28 Nov 2024 11:15:50 -0500 From: Tom Lane To: Bertrand Mamasam cc: pgsql-general@postgresql.org Subject: Re: ERROR wrong varnullingrels (b 3) (expected (b)) with LEFT JOIN LATERAL and CTE In-reply-to: References: Comments: In-reply-to Bertrand Mamasam message dated "Thu, 28 Nov 2024 15:35:08 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2090949.1732810550.1@sss.pgh.pa.us> Date: Thu, 28 Nov 2024 11:15:50 -0500 Message-ID: <2090950.1732810550@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bertrand Mamasam writes: > I get this error in PG16.5, 16.6 and 17 : > wrong varnullingrels (b 3) (expected (b)) for Var 1/19 Please provide a self-contained test case. A fragmentary query with no underlying tables is useless for investigation. https://wiki.postgresql.org/wiki/Guide_to_reporting_problems regards, tom lane