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 1nnrAD-0003HN-0x for pgsql-bugs@arkaria.postgresql.org; Mon, 09 May 2022 00:22:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nnrAB-0001Cz-MH for pgsql-bugs@arkaria.postgresql.org; Mon, 09 May 2022 00:22:11 +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 1nnrAB-0001Cp-Cy for pgsql-bugs@lists.postgresql.org; Mon, 09 May 2022 00:22:11 +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 1nnrA6-0002nA-El for pgsql-bugs@lists.postgresql.org; Mon, 09 May 2022 00:22:09 +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 2490M19L3488098; Sun, 8 May 2022 20:22:01 -0400 From: Tom Lane To: milos.urbanek@email.cz cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17476: ERROR: "variable not found in subplan target list" when running SELECT COUNT(*) In-reply-to: <17476-cf579fc6b204baa2@postgresql.org> References: <17476-cf579fc6b204baa2@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Sun, 08 May 2022 22:11:03 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3488096.1652055721.1@sss.pgh.pa.us> Date: Sun, 08 May 2022 20:22:01 -0400 Message-ID: <3488097.1652055721@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: > Trying to run simple SELECT COUNT(*) from some table gives me the following > error (either running by hand or trying to run EXPLAIN using pgadmin or by > hand): > 2022-05-09 00:06:30.428 CEST [1196] ERROR: variable not found in subplan > target list > 2022-05-09 00:06:30.428 CEST [1196] STATEMENT: SELECT COUNT(*) FROM > "domino_efekty_havarijniprojev" Is that really just a table? I could believe a bug like this for some types of views, but it's a bit hard to credit for a plain table. In any case, we can't do much with this report unless you can provide a reproducer case --- preferably a SQL script that creates an object that triggers the problem. regards, tom lane