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 1lZwTb-0001pO-4A for pgsql-bugs@arkaria.postgresql.org; Fri, 23 Apr 2021 14:08:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZwTZ-0001Dq-VW for pgsql-bugs@arkaria.postgresql.org; Fri, 23 Apr 2021 14:08:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZwTZ-0001Dj-PV for pgsql-bugs@lists.postgresql.org; Fri, 23 Apr 2021 14:08:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZwTX-0007dV-Uz for pgsql-bugs@lists.postgresql.org; Fri, 23 Apr 2021 14:08:08 +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 13NE86R41313768; Fri, 23 Apr 2021 10:08:06 -0400 From: Tom Lane To: tharakan@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16978: Nested CTEs give ERROR in v13 In-reply-to: <16978-813ac0832f35db82@postgresql.org> References: <16978-813ac0832f35db82@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 23 Apr 2021 00:13:41 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1313766.1619186886.1@sss.pgh.pa.us> Date: Fri, 23 Apr 2021 10:08:06 -0400 Message-ID: <1313767.1619186886@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: > This narrowed down SQL (from what SQLSmith generated) seems to error out > only with N levels of CTE nesting - no tables / views / 1-row output. > The SQL works fine with v12.4 but raises an ERROR in v13 which seems like a > regression. Is this owing a recent change in v13 - that could affect this? FWIW, I don't see any error from this, either in HEAD or the back branches. $ cat recursive.sql WITH RECURSIVE w6(c6) AS (WITH w6(c6) AS (WITH w8(c8) AS (WITH w9(c9) AS (WITH w10(c10) AS (WITH w11(c11) AS (WITH w_err(c12) AS (SELECT 1) SELECT * FROM w_err) SELECT * FROM w11) SELECT * FROM w10) SELECT * FROM w9) SELECT * FROM w8) SELECT * FROM w6) SELECT * FROM w6; $ psql -f recursive.sql c6 ---- 1 (1 row) regards, tom lane