Teach is_distinct_query to recognize that GROUP BY forces a subquery's output to be distinct, if all the GROUP BY columns appear in the output. Per suggestion from Dennis Haney.
Will this have should-be-in-release-notes side effects just as the results of a DISTINCT over a GROUP BY no longer being sorted?
Chris
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend