aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/advanced.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-10-04 20:44:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-10-04 20:44:55 +0000
commit0969e9cc0e47c141a0075cdbc2a0369113d206db (patch)
treeabeea0ff19ce32a6141ab1945829024b422f57f9 /src/tutorial/advanced.source
parentf3c6d3daf901b69226fa7c930d655bc5ce6adca0 (diff)
downloadpostgresql-0969e9cc0e47c141a0075cdbc2a0369113d206db.tar.gz
postgresql-0969e9cc0e47c141a0075cdbc2a0369113d206db.zip
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.
Diffstat (limited to 'src/tutorial/advanced.source')
0 files changed, 0 insertions, 0 deletions