I am working in optimizer module of postgreSQL 9.4.1. My project is concerned with the plan returned by the optimizer.
I am trying to return a subplan for a query instead of full plan. For this I need to return a path form RelOptInfo *standard_join_search() at allpaths.c other than from last level of root->join_rel_level().
while doing so I am getting error :variable not found in subplan target lists at function fix_join_expr_mutator at setrefs.c.
It will be great if you can give me some idea about why this error is happening,since this error is happening at above function, Please give me more information about that portion of code. Also I want to know for what targetlist stands for.