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

From Andrew Gierth
Subject Re: Aggregate ORDER BY patch
Date
Msg-id 87zl6nhyhl.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: Aggregate ORDER BY patch  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@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
plannerto detect>> that (which means not reporting the error position?)
 
Tom> Well, at the moment there's only going to be a sort-basedTom> implementation, so I don't object to throwing an
errorfor thatTom> as soon as possible.  OTOH I wouldn't recommend expending a lotTom> of code to do it there.  I would
hopethat most of the parser'sTom> work for this can be shared with the existing support forTom> 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.


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [COMMITTERS] pgsql: /home/peter/commit-msg
Next
From: Andrew Gierth
Date:
Subject: ORDER BY vs. volatile functions