Getting ERROR "subplan "SubPlan 1" was not initialized" in EXISTS subplan when using for list partition. - Mailing list pgsql-hackers

From Rajkumar Raghuwanshi
Subject Getting ERROR "subplan "SubPlan 1" was not initialized" in EXISTS subplan when using for list partition.
Date
Msg-id CAKcux6==O3NNZC3bZ2prRYv3cjm3_Zw1GfzmOjEVqYN4jub2+Q@mail.gmail.com
Whole thread Raw
Responses Re: Getting ERROR "subplan "SubPlan 1" was not initialized" in EXISTS subplan when using for list partition.
Re: Getting ERROR "subplan "SubPlan 1" was not initialized" in EXISTS subplan when using for list partition.
List pgsql-hackers
Hi,

I am getting "ERROR:  subplan "SubPlan 1" was not initialized" error with below test case.

CREATE TABLE tbl ( c1 int, c2 int, c3 int ) PARTITION BY LIST (c1);
create table tbl_null PARTITION OF tbl FOR VALUES IN (null);
create table tbl_def PARTITION OF tbl DEFAULT;
insert into tbl values (8800,0,0);
insert into tbl values (1891,1,1);
insert into tbl values (3420,2,0);
insert into tbl values (9850,3,0);
insert into tbl values (7164,4,4);
analyze tbl;
explain (costs off) select count(*) from tbl t1 where (exists(select 1 from tbl t2 where t2.c1 = t1.c2) or c3 < 0);

postgres=# explain (costs off) select count(*) from tbl t1 where (exists(select 1 from tbl t2 where t2.c1 = t1.c2) or c3 < 0);
ERROR:  subplan "SubPlan 1" was not initialized

Thanks & Regards,
Rajkumar Raghuwanshi

pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: Increase value of OUTER_VAR
Next
From: Aleksander Alekseev
Date:
Subject: Re: Physical replication from x86_64 to ARM64