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 1oYuSa-0006pa-IX for pgsql-bugs@arkaria.postgresql.org; Thu, 15 Sep 2022 19:23:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oYuSZ-00079K-FX for pgsql-bugs@arkaria.postgresql.org; Thu, 15 Sep 2022 19:23:39 +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 1oYuSZ-00079B-7m for pgsql-bugs@lists.postgresql.org; Thu, 15 Sep 2022 19:23:39 +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 1oYuSW-0006mJ-6A for pgsql-bugs@lists.postgresql.org; Thu, 15 Sep 2022 19:23:38 +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 28FJNUlO3419784; Thu, 15 Sep 2022 15:23:30 -0400 From: Tom Lane To: androiddown_weiwei@hotmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17614: "variable not found in subplan target lists" on grouping query In-reply-to: <17614-8ec20c85bdecaa2a@postgresql.org> References: <17614-8ec20c85bdecaa2a@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 15 Sep 2022 12:35:33 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3419782.1663269810.1@sss.pgh.pa.us> Date: Thu, 15 Sep 2022 15:23:30 -0400 Message-ID: <3419783.1663269810@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 problem is reproducible with following sql: > ``` > SELECT > sp2.spf_id > FROM > information_schema.sql_parts AS sp > CROSS JOIN LATERAL ( SELECT sizing_id FROM information_schema.sql_sizing ) > AS ss > CROSS JOIN LATERAL ( SELECT sp.feature_id AS spf_id ) AS sp2 > GROUP BY > CUBE ( sp2.spf_id ) > ``` > but seems having been fixed since 12.0 Yeah, it's a bug in code that we actually removed in v12 (so the fix was kind of accidental). Repaired, thanks for the report! regards, tom lane