Re: Aggregate ORDER BY patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Aggregate ORDER BY patch
Date
Msg-id 4505.1258132156@sss.pgh.pa.us
Whole thread Raw
In response to Re: Aggregate ORDER BY patch  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: Aggregate ORDER BY patch
Re: Aggregate ORDER BY patch
List pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> "Peter" == Peter Eisentraut <peter_e@gmx.net> writes:
>  Peter> This is exactly the syntax that is in the spec AFAICT.

> Right. The spec defines this syntax for array_agg and xmlagg (only).

Cool, I had forgotten that they added that in the latest revisions.
I withdraw the complaint that this patch goes too far beyond the spec.

> But it would be entirely unreasonable, the way postgres works, to
> implement ORDER BY for only specific aggregates.

Quite.  This is another instance of the thing I complained of before,
that the SQL committee likes to define the behavior of specific
aggregates instead of inducing a generic aggregate-behavior definition.
So we're on our own to extract one, and this proposal seems pretty
reasonable to me: it's useful and it's consistent with the query-level
behavior of DISTINCT and ORDER BY.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Experimental patch: generating BKI revisited
Next
From: Heikki Linnakangas
Date:
Subject: Re: next CommitFest