[HACKERS] ToDo: listagg is in ANSI/SQL:2016

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема [HACKERS] ToDo: listagg is in ANSI/SQL:2016
Дата
Msg-id CAFj8pRD=BR0JM8NFVpFsaY3ztvEupwhSKgDkHLCRLjpCMM1RAA@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi

looks like Oracle has pretty strong position in standard. ANSI SQL has new aggregate function listagg. It is supported by DB2 too.

Unfortunately one supported syntax is not possible in Postgres due our design of ordered aggregates.

Syntax:

1. listagg(expr) FROM ... not deterministic result
2. listagg(expr, separator) FROM ... previous with separator - when sep. is NULL, then it is ignored

3. listagg(expr [, sep]) WITHIN GROUP (ORDER BY expr_list)

last syntax is not available in Postgres - because our ordered aggregates expects immutable arguments in ordered aggregates arguments. First two are not supported two, because ORDER BY clause is required every time.

Regards

Pavel


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

Предыдущее
От: Ashutosh Sharma
Дата:
Сообщение: Re: [HACKERS] PATCH: pageinspect / add page_checksum and bt_page_items(bytea)
Следующее
От: David Rowley
Дата:
Сообщение: Re: [HACKERS] Performance improvement for joins where outer side is unique