postgresql/src/include/optimizer
Tom Lane 89db887b1e 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:47 +00:00
..
clauses.h Get rid of some old and crufty global variables in the planner. When 2007-02-19 07:03:34 +00:00
cost.h Fix cost estimates for EXISTS subqueries that are evaluated as initPlans 2007-09-22 21:36:40 +00:00
geqo_copy.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
geqo_gene.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
geqo_misc.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
geqo_mutation.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
geqo_pool.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
geqo_random.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
geqo_recombination.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
geqo_selection.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
geqo.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
joininfo.h Refactor planner's pathkeys data structure to create a separate, explicit 2007-01-20 20:45:41 +00:00
pathnode.h Refactor planner's pathkeys data structure to create a separate, explicit 2007-01-20 20:45:41 +00:00
paths.h Create a function variable "join_search_hook" to let plugins override the 2007-09-26 18:51:51 +00:00
plancat.h Rename DLLIMPORT macro to PGDLLIMPORT to avoid conflict with 2007-07-25 12:22:54 +00:00
planmain.h Keep the planner from failing on "WHERE false AND something IN (SELECT ...)". 2007-10-04 20:44:47 +00:00
planner.h Rename DLLIMPORT macro to PGDLLIMPORT to avoid conflict with 2007-07-25 12:22:54 +00:00
predtest.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
prep.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
restrictinfo.h Refactor planner's pathkeys data structure to create a separate, explicit 2007-01-20 20:45:41 +00:00
subselect.h Get rid of some old and crufty global variables in the planner. When 2007-02-19 07:03:34 +00:00
tlist.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
var.h HOT updates. When we update a tuple without changing any of its indexed 2007-09-20 17:56:33 +00:00