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 1okCxA-0004v4-Ha for pgsql-bugs@arkaria.postgresql.org; Sun, 16 Oct 2022 23:21:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1okCx9-0007XY-1S for pgsql-bugs@arkaria.postgresql.org; Sun, 16 Oct 2022 23:21:55 +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 1okCx8-0007XP-Pm for pgsql-bugs@lists.postgresql.org; Sun, 16 Oct 2022 23:21:54 +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 1okCx6-0001qn-Pl for pgsql-bugs@lists.postgresql.org; Sun, 16 Oct 2022 23:21:53 +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 29GNLojX2052065; Sun, 16 Oct 2022 19:21:51 -0400 From: Tom Lane To: postgresql@zr40.nl cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17644: EXPLAIN VERBOSE fails on query with SEARCH BREADTH FIRST In-reply-to: <17644-3bd1f3036d6d7a16@postgresql.org> References: <17644-3bd1f3036d6d7a16@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Sun, 16 Oct 2022 16:50:14 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2052063.1665962510.1@sss.pgh.pa.us> Date: Sun, 16 Oct 2022 19:21:50 -0400 Message-ID: <2052064.1665962510@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: > The following query causes EXPLAIN VERBOSE to raise an error. > EXPLAIN VERBOSE > WITH RECURSIVE test AS ( > SELECT 1 AS x > UNION ALL > SELECT x+1 > FROM test > ) SEARCH BREADTH FIRST BY x SET y > SELECT * FROM test LIMIT 10; > ERROR: record type has not been registered Thanks for the report! We'd fixed some closely-related cases during v14 beta, but nobody stumbled on this one. The key point seems to be using all constants in the non-recursive term's SELECT list. regards, tom lane