Re: WITHIN GROUP patch - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: WITHIN GROUP patch
Date
Msg-id 87d2nc8ry1.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: WITHIN GROUP patch  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: WITHIN GROUP patch  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: WITHIN GROUP patch  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
>>>>> "Pavel" == Pavel Stehule <pavel.stehule@gmail.com> writes:
>> I found so following error message is not too friendly (mainly because>> this functionality will be new)>> >>
postgres=#select dense_rank(3,3,2) within group (order by num desc, odd)>> from test4;>> ERROR:  Incorrect number of
argumentsfor hypothetical set function>> LINE 1: select dense_rank(3,3,2) within group (order by num desc, od...>> ^>>
>>Probably some hint should be there?
 

Hm, yeah.

Anyone have ideas for better wording for the original error message,
or a DETAIL or HINT addition? The key point here is that the number of
_hypothetical_ arguments and the number of ordered columns must match,
but we don't currently exclude the possibility that a user-defined
hypothetical set function might have additional non-hypothetical args.

The first alternative that springs to mind is:

ERROR: Incorrect number of arguments for hypothetical set function
DETAIL: Number of hypothetical arguments (3) must equal number of ordered columns (2)

-- 
Andrew (irc:RhodiumToad)



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [COMMITTERS] pgsql: Replace duplicate_oids with Perl implementation
Next
From: Andrew Dunstan
Date:
Subject: Re: Bugfix and new feature for PGXS