>>>>> "Tom" == Tom Lane <t...@sss.pgh.pa.us> 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?) Tom> Well, at the moment there's only going to be a sort-based Tom> implementation, so I don't object to throwing an error for that Tom> as soon as possible. OTOH I wouldn't recommend expending a lot Tom> of code to do it there. I would hope that most of the parser's Tom> work for this can be shared with the existing support for Tom> query-level ORDER BY/DISTINCT. The code already uses transformSortClause for most of the work, but reusing the existing code for DISTINCT would have required more refactoring than I was happy with, because transformDistinct etc. all have error message text which is specific to SELECT DISTINCT etc. Let's see how it falls out in the next patch. -- Andrew. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers