postgresql/src/include/optimizer
Tom Lane 7097e6c4a4 Wrap appendrel member outputs in PlaceHolderVars in additional cases.
Add PlaceHolderVar wrappers as needed to make UNION ALL sub-select output
expressions appear non-constant and distinct from each other.  This makes
the world safe for add_child_rel_equivalences to do what it does.  Before,
it was possible for that function to add identical expressions to different
EquivalenceClasses, which logically should imply merging such ECs, which
would be wrong; or to improperly add a constant to an EquivalenceClass,
drastically changing its behavior.  Per report from Teodor Sigaev.

The only currently known consequence of this bug is "MergeAppend child's
targetlist doesn't match MergeAppend" planner failures in 9.1 and later.
I am suspicious that there may be other failure modes that could affect
older release branches; but in the absence of any hard evidence, I'll
refrain from back-patching further than 9.1.
2011-11-08 21:14:28 -05:00
..
clauses.h Avoid listing ungrouped Vars in the targetlist of Agg-underneath-Window. 2011-07-12 18:24:53 -04:00
cost.h Improve cost estimation for aggregates and window functions. 2011-04-24 16:55:20 -04:00
geqo.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_copy.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_gene.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_misc.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_mutation.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_pool.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_random.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_recombination.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
geqo_selection.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
joininfo.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
pathnode.h pgindent run before PG 9.1 beta 1. 2011-04-10 11:42:00 -04:00
paths.h pgindent run before PG 9.1 beta 1. 2011-04-10 11:42:00 -04:00
placeholder.h Wrap appendrel member outputs in PlaceHolderVars in additional cases. 2011-11-08 21:14:28 -05:00
plancat.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
planmain.h Fix nested PlaceHolderVar expressions that appear only in targetlists. 2011-08-09 00:48:58 -04:00
planner.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
predtest.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
prep.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
restrictinfo.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
subselect.h Fix handling of PlaceHolderVars in nestloop parameter management. 2011-11-03 00:51:06 -04:00
tlist.h Avoid listing ungrouped Vars in the targetlist of Agg-underneath-Window. 2011-07-12 18:24:53 -04:00
var.h Avoid listing ungrouped Vars in the targetlist of Agg-underneath-Window. 2011-07-12 18:24:53 -04:00