Apply my original fix for Taiki Yamaguchi's bug report about DISTINCT MAX().

Tom Lane <tgl@sss.pgh.pa.us>

Commit: d344115519a5c88bfa8bf8551258f4eaaa1185be
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2008-03-31T16:59:26Z
Releases: 8.4.0
Apply my original fix for Taiki Yamaguchi's bug report about DISTINCT MAX().
Add some regression tests for plausible failures in this area.

Files