Department of second thoughts: the rule that ORDER BY and DISTINCT are
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 28 Mar 2008 02:00:11 +0000 (02:00 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 28 Mar 2008 02:00:11 +0000 (02:00 +0000)
commit3cef16ec8827d98f10b6f9771a6f961017d16c96
tree67d376d999624639f7a83f3f5095e2be178519a5
parent1ffcc175b4b3fa807b651431f98503c7cb0dd6f8
Department of second thoughts: the rule that ORDER BY and DISTINCT are
useless for an ungrouped-aggregate query holds regardless of whether
optimize_minmax_aggregates succeeds.  So we might as well apply the
optimization in any case.

I'll leave 8.3 as it was, since this version is a tad more invasive
than my earlier patch.
src/backend/optimizer/plan/planner.c