Re: Aggregate ORDER BY patch
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Hitoshi Harada <umi.tanuki@gmail.com>, pgsql-hackers@postgresql.org
Date: 2009-11-16T03:31:12Z
Lists: 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