Re: MAX/MIN optimization via rewrite (plus query rewrites generally) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: MAX/MIN optimization via rewrite (plus query rewrites generally)
Date
Msg-id 10557.1100201196@sss.pgh.pa.us
Whole thread Raw
In response to Re: MAX/MIN optimization via rewrite (plus query rewrites generally)  (Greg Stark <gsstark@mit.edu>)
Responses Re: MAX/MIN optimization via rewrite (plus query rewrites generally)  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark <gsstark@mit.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: multiline CSV fields
Next
From: Tom Lane
Date:
Subject: Re: MAX/MIN optimization via rewrite (plus query rewrites generally)