Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1uTu-0000mB-Ii for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Jul 2021 17:40:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1uTt-0001RS-Hy for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Jul 2021 17:40:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1uTt-0001RK-Bc for pgsql-bugs@lists.postgresql.org; Fri, 09 Jul 2021 17:40:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1uTq-0004i5-QC for pgsql-bugs@lists.postgresql.org; Fri, 09 Jul 2021 17:40:04 +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 169Hdwwl2257079; Fri, 9 Jul 2021 13:39:58 -0400 From: Tom Lane To: John Naylor cc: cyg0810@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17097: FailedAssertion at initsplan.c In-reply-to: References: <17097-3372ef9f798fc94f@postgresql.org> <2230092.1625848961@sss.pgh.pa.us> Comments: In-reply-to John Naylor message dated "Fri, 09 Jul 2021 12:53:37 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2257077.1625852398.1@sss.pgh.pa.us> Date: Fri, 09 Jul 2021 13:39:58 -0400 Message-ID: <2257078.1625852398@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk John Naylor writes: > If it saves you some time, the assert happens here in > replace_vars_in_jointree(): > case RTE_JOIN: > case RTE_CTE: > case RTE_NAMEDTUPLESTORE: > case RTE_RESULT: > /* these shouldn't be marked LATERAL */ > Assert(false); > break; > where the plan has RTE_RESULT Ah. When converting the FUNCTION RTE to a dummy RESULT, we must clear its lateral flag to avoid making this logic unhappy. Fixed. regards, tom lane