ERROR: XX000: variable not found in subplan target list

From: Ryan Kelly <rpkelly22(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: ERROR: XX000: variable not found in subplan target list
Date: 2022-02-11 03:21:56
Message-ID: CAHUie24ddN+pDNw7fkhNrjrwAX=fXXfGZZEHhRuofV_N_ftaSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello,

After upgrading to 11.15 we have queries failing as follows:
(postgres(at)[local]:5432 02:52:54) [capitalrx_test_adjudication_master]>
EXPLAIN SELECT count(*) FROM adjudication.claims;
ERROR: XX000: variable not found in subplan target list
LOCATION: fix_upper_expr_mutator, setrefs.c:2427
Time: 0.697 ms
(postgres(at)[local]:5432 02:53:00) [capitalrx_test_adjudication_master]>
EXPLAIN SELECT count(1) FROM adjudication.claims;
ERROR: XX000: variable not found in subplan target list
LOCATION: fix_upper_expr_mutator, setrefs.c:2427
Time: 0.541 ms
(postgres(at)[local]:5432 02:53:03) [capitalrx_test_adjudication_master]>
EXPLAIN SELECT count(null) FROM adjudication.claims;
ERROR: XX000: variable not found in subplan target list
LOCATION: fix_upper_expr_mutator, setrefs.c:2427
Time: 0.890 ms
(postgres(at)[local]:5432 02:53:06) [capitalrx_test_adjudication_master]>
EXPLAIN SELECT count(id) FROM adjudication.claims;
QUERY PLAN

-------------------------------------------------------------------------------------
Aggregate (cost=8.14..8.15 rows=1 width=8)
-> Index Only Scan using claims_pkey on claims (cost=0.12..8.14 rows=1
width=8)
(2 rows)

Time: 1.423 ms

Thanks,
-Ryan Kelly

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-02-11 04:03:21 Re: ERROR: XX000: variable not found in subplan target list
Previous Message Andres Freund 2022-02-11 02:18:12 Re: BUG #17401: REINDEX TABLE CONCURRENTLY creates a race condition on a streaming replica