David Fetter <david(at)fetter(dot)org> writes:
> It seems to me that DISTINCT ON is just a special case of the more
> general windowing functions
> <http://archives.postgresql.org/pgsql-hackers/2008-07/msg01277.php>
> Harada-san has been working on. Could these use the same machinery?
Perhaps at some point we could deprecate DISTINCT ON in favor of using
windowing functions, but I'd not want to weigh down the windowing work
with a mandate that it be bug-compatible with DISTINCT ON.
regards, tom lane