Andrew Gierth <and...@tao11.riddles.org.uk> writes: > Query-level DISTINCT shouldn't allow columns in the order by that > aren't in the select list because those columns _do not exist_ at the > point that ordering logically takes place (even though in the > implementation, they might).
> This isn't the case for aggregate order by. I entirely disagree. Why should the semantics of this combination of ORDER BY and DISTINCT be different from what they are at the query top level? We made other decisions about this feature on the basis of making the two cases work alike, and I don't think you've made an adequate argument for making them act differently. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers