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

Поиск
Список
Период
Сортировка
От Miloš Urbánek
Тема Re: BUG #17476: ERROR: "variable not found in subplan target list" when running SELECT COUNT(*)
Дата
Msg-id 5wS.wBLd.2GdiEutIVdh.1YUC4K@scif.cz
обсуждение исходный текст
Ответы Re: BUG #17476: ERROR: "variable not found in subplan target list" when running SELECT COUNT(*)  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-bugs
I have 2 (ordinary) tables in 900+ table database restored from PG 9.6 (with PostGIS geometries BTW) where this problem occurs.
The count() queries into the other tables are OK.
Also the problem happens only at the server but not at my Windows 10 workstation with the same PG 14.2.
No clue what could be wrong.

PGAdmin4 fails even when trying to list SQL creation statement.

--
Milos Urbanek

---------- Původní e-mail ----------
Od: Tom Lane <tgl@sss.pgh.pa.us>
Komu: milos.urbanek@email.cz
Datum: 9. 5. 2022 2:22:10
Předmět: Re: BUG #17476: ERROR: "variable not found in subplan target list" when running SELECT COUNT(*)
PG Bug reporting form <noreply@postgresql.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Security Definer functions no longer works in PG14+
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: BUG #17476: ERROR: "variable not found in subplan target list" when running SELECT COUNT(*)