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

From Tom Lane
Subject Re: Aggregate ORDER BY patch
Date
Msg-id 463.1258342272@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
List pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> What about error handling? If the user specifies agg(distinct x) where
> x is not sortable, do we leave it to the planner to detect that (which
> means not reporting the error position?)

Well, at the moment there's only going to be a sort-based
implementation, so I don't object to throwing an error for that
as soon as possible.  OTOH I wouldn't recommend expending a lot
of code to do it there.  I would hope that most of the parser's
work for this can be shared with the existing support for query-level
ORDER BY/DISTINCT.  If that means that we don't complain immediately
about cases where there is hash but not sort support, that seems all
right to me, because there are very few such datatypes anyway.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Aggregate ORDER BY patch
Next
From: Robert Haas
Date:
Subject: Re: named parameters in SQL functions