Re: BUG #17476: ERROR: "variable not found in subplan target list" when running SELECT COUNT(*)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: milos(dot)urbanek(at)email(dot)cz
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17476: ERROR: "variable not found in subplan target list" when running SELECT COUNT(*)
Date: 2022-05-09 00:22:01
Message-ID: 3488097.1652055721@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Corey Huinker 2022-05-09 03:44:33 Re: Query generates infinite loop
Previous Message PG Bug reporting form 2022-05-08 22:11:03 BUG #17476: ERROR: "variable not found in subplan target list" when running SELECT COUNT(*)