postgresql/src/include/optimizer
Tom Lane 57664ed25e 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:21 -05:00
..
clauses.h Avoid listing ungrouped Vars in the targetlist of Agg-underneath-Window. 2011-07-12 18:24:39 -04:00
cost.h Support index-only scans using the visibility map to avoid heap fetches. 2011-10-07 20:14:13 -04:00
geqo.h Make pgbench use erand48() rather than random(). 2011-08-03 16:26:40 -04: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 Remove unnecessary #include references, per pgrminclude script. 2011-09-01 10:04:27 -04: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 Support index-only scans using the visibility map to avoid heap fetches. 2011-10-07 20:14:13 -04:00
paths.h Improve planner's ability to recognize cases where an IN's RHS is unique. 2011-10-26 17:52:29 -04:00
placeholder.h Wrap appendrel member outputs in PlaceHolderVars in additional cases. 2011-11-08 21:14:21 -05:00
plancat.h Measure the number of all-visible pages for use in index-only scan costing. 2011-10-14 17:23:46 -04:00
planmain.h Rearrange planner to save the whole PlannerInfo (subroot) for a subquery. 2011-09-03 15:36:24 -04:00
planner.h Recognize self-contradictory restriction clauses for non-table relations. 2011-09-24 19:33:16 -04: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:50:58 -04:00
tlist.h Avoid listing ungrouped Vars in the targetlist of Agg-underneath-Window. 2011-07-12 18:24:39 -04:00
var.h Support index-only scans using the visibility map to avoid heap fetches. 2011-10-07 20:14:13 -04:00