Re: ordered aggregates using WITHIN GROUP (was Re: can somebody execute this query on Oracle 11.2g and send result?)

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: ordered aggregates using WITHIN GROUP (was Re: can somebody execute this query on Oracle 11.2g and send result?)
Дата
Msg-id 162867791001290807m3f35a17cnccc2fbd82221405f@mail.gmail.com
обсуждение исходный текст
Ответ на ordered aggregates using WITHIN GROUP (was Re: can somebody execute this query on Oracle 11.2g and send result?)  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
2010/1/29 Alvaro Herrera <alvherre@commandprompt.com>:
> Jonah H. Harris escribió:
>
>> The syntax is listagg(expression [, delimiter]) WITHIN GROUP (order by
>> clause) [OVER partition clause]
>> If a delimiter is defined, it must be a constant.
>>
>> Query: SELECT listagg(a, ',') WITHIN GROUP (ORDER BY a) FROM foo;
>> Result: aaa,bbb,ccc
>
> So that's how Oracle supports ordered aggregates?  Interesting -- we
> just got that capability but using a different syntax.  Hmm, the
> SQL:200x draft also has <within group specification> which seems the
> standard way to do the ORDER BY stuff for aggregates ...  Should we
> change the syntax?

Oracle syntax is little bit longer, but it is safer. What is a standard?


Regards
Pavel Stehule

p.s. if it is only syntactic suger, then can't be a problem.

Pavel
>
> --
> Alvaro Herrera                                http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: ordered aggregates using WITHIN GROUP (was Re: can somebody execute this query on Oracle 11.2g and send result?)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 64-bit size pgbench