Re: Document aggregate functions better w.r.t. ORDER BY

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Document aggregate functions better w.r.t. ORDER BY
Дата
Msg-id CAKFQuwb3_r5E_6aVb6Nr4_P-HX29GYfwRJjWCjPibp7xfJLtFA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Document aggregate functions better w.r.t. ORDER BY  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Document aggregate functions better w.r.t. ORDER BY
Список pgsql-hackers
On Thu, Oct 26, 2023 at 3:36 PM Bruce Momjian <bruce@momjian.us> wrote:
No sneaking.  ;-)  It would be bad to document this unevenly because it
sets expectations in other parts of the system if we don't mention it.

Agreed.

Last suggestion, remove the first jsonb_agg example that lacks an order by.

+WITH vals (k, v) AS ( VALUES ('key0','1'), ('key1','3'), ('key1','2') )
+SELECT jsonb_object_agg(k, v) FROM vals;
+      jsonb_object_agg
+----------------------------
+ {"key0": "1", "key1": "2"}
+

We shouldn't write an example that relies on the rows being evaluated 1-2-3 without specifying an order by clause.

David J.

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Document aggregate functions better w.r.t. ORDER BY
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Does UCS_BASIC have the right CTYPE?