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