Re: WITHIN GROUP patch

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: WITHIN GROUP patch
Дата
Msg-id CA+Tgmoa91a2yW3D=+gzN0cGnzF7jo7xNW1ofXZX5ro5=xyQxaw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WITHIN GROUP patch  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список pgsql-hackers
On Thu, Oct 10, 2013 at 10:35 PM, Andrew Gierth
<andrew@tao11.riddles.org.uk> wrote:
> 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)

I'd suggest trying to collapse that down into a single message; the
DETAIL largely recapitulates the original error message.  Also, I'd
suggest identifying the name of the function, since people may not be
able to identify that easily based just on the fact that it's a
hypothetical set function.

Here's one idea, with two variants depending on the direction of the inequality:

ERROR: function "%s" has %d arguments but only %d ordering columns
ERROR: function "%s" has %d ordering columns but only %d arguments

Or else leave out the actual numbers and just state the principle, but
identifying the exact function at fault, e.g.

ERROR: number of arguments to function "%s" does not match number of
ordering columns

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Huchev
Дата:
Сообщение: Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption
Следующее
От: Robert Haas
Дата:
Сообщение: Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE