Greg Stark <gsstark(at)mit(dot)edu> writes:
> It would also make it possible to deprecate DISTINCT ON in favour of GROUP BY
> with first() calls.
Oh? How is a first() aggregate going to know what sort order you want
within the group? AFAICS first() is only useful when you honestly do
not care which group member you get ... which is certainly not the case
for applications of DISTINCT ON.
regards, tom lane