Re: ORDER BY clause in aggregate doesn't work well with multi argument aggregates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ORDER BY clause in aggregate doesn't work well with multi argument aggregates
Дата
Msg-id 8638.1261769192@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ORDER BY clause in aggregate doesn't work well with multi argument aggregates  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2009/12/25 Tom Lane <tgl@sss.pgh.pa.us>:
>> No, because you could have more than one ORDER BY item.

> hmm - this isn't bullet-prof design :(

I notice that ORDER BY 'x' draws an error at the query level but not
within aggregates or window functions.  I wonder if we should have the
"SQL99" ORDER BY code throw an error for a simple literal ORDER BY item.
There isn't any visible use for ordering by a constant, and this would
catch some possible misunderstandings.  For instance, it would have
complained about Pavel's original example in this thread, and we could
word the error message to make it clear that the system thinks that's
an ORDER BY value not an aggregate argument.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: info about patch: using parametrised query in psql
Следующее
От: Tom Lane
Дата:
Сообщение: Re: info about patch: using parametrised query in psql