postgresql/src/include/optimizer
Tom Lane 0969e9cc0e Keep the planner from failing on "WHERE false AND something IN (SELECT ...)".
eval_const_expressions simplifies this to just "WHERE false", but we have
already done pull_up_IN_clauses so the IN join will be done, or at least
planned, anyway.  The trouble case comes when the sub-SELECT is itself a join
and we decide to implement the IN by unique-ifying the sub-SELECT outputs:
with no remaining reference to the output Vars in WHERE, we won't have
propagated the Vars up to the upper join point, leading to "variable not found
in subplan target lists" error.  Fix by adding an extra scan of in_info_list
and forcing all Vars mentioned therein to be propagated up to the IN join
point.  Per bug report from Miroslav Sulc.
2007-10-04 20:44:55 +00:00
..
clauses.h Revise the planner's handling of "pseudoconstant" WHERE clauses, that is 2006-07-01 18:38:33 +00:00
cost.h pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
geqo.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
geqo_copy.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
geqo_gene.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
geqo_misc.h Fix some missing inclusions identified with new pgcheckdefines tool. 2006-07-15 03:35:21 +00:00
geqo_mutation.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
geqo_pool.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
geqo_random.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
geqo_recombination.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
geqo_selection.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
joininfo.h Fix planner to do the right thing when a degenerate outer join (one whose 2006-12-12 21:31:09 +00:00
pathnode.h pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
paths.h Fix best_inner_indexscan to return both the cheapest-total-cost and 2007-05-22 01:40:42 +00:00
plancat.h pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
planmain.h Keep the planner from failing on "WHERE false AND something IN (SELECT ...)". 2007-10-04 20:44:55 +00:00
planner.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
predtest.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
prep.h pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
restrictinfo.h Fix a bug in the original implementation of redundant-join-clause removal: 2007-07-31 19:53:50 +00:00
subselect.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
tlist.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
var.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00