postgresql/src/backend/optimizer/path
Tom Lane 4886dc92e0 Fix set_subquery_pathlist() to copy the RTE's subquery before it gets mangled
by the planning process.  This prevents the "failed to locate grouping columns"
error recently reported by Dickson Guedes.  That happens because planning
replaces SubLinks by SubPlans in the subquery's targetlist, and exprTypmod()
is smarter about the former than the latter, causing the apparent type of
the subquery's output columns to change.  This seems to be a deficiency we
should fix in exprTypmod(), but that will be a much more invasive patch
with possible side-effects elsewhere, so I'll do that only in HEAD.

Back-patch to 8.3.  Arguably the lack of a copying step is broken/dangerous
all the way back, but in the absence of known problems I'll refrain from
making the older branches pay the extra cost.  (The reason this particular
symptom didn't appear before is that exprTypmod() wasn't smart about SubLinks
either, until 8.3.)
2009-03-10 20:58:26 +00:00
..
allpaths.c Fix set_subquery_pathlist() to copy the RTE's subquery before it gets mangled 2009-03-10 20:58:26 +00:00
clausesel.c Fix cost_mergejoin's failure to adjust for rescanning of non-unique merge join 2009-02-06 23:43:24 +00:00
costsize.c Fix cost_mergejoin's failure to adjust for rescanning of non-unique merge join 2009-02-06 23:43:24 +00:00
equivclass.c Fix cost_mergejoin's failure to adjust for rescanning of non-unique merge join 2009-02-06 23:43:24 +00:00
indxpath.c Teach the planner to support index access methods that only implement 2009-03-05 23:06:45 +00:00
joinpath.c Fix an old corner-case error in match_unsorted_outer(): don't consider 2009-02-05 01:24:55 +00:00
joinrels.c Tighten up join ordering rules to account for recent more-careful analysis 2009-02-27 22:41:38 +00:00
Makefile Refactor backend makefiles to remove lots of duplicate code 2008-02-19 10:30:09 +00:00
orindxpath.c Teach the planner to treat a partial unique index as proving a variable is 2009-02-15 20:16:21 +00:00
pathkeys.c Shave a few cycles in compare_pathkeys() by checking for pointer-identical 2009-02-28 03:51:05 +00:00
tidpath.c Update copyright for 2009. 2009-01-01 17:24:05 +00:00