[HACKERS] json_agg produces nonstandard json

Поиск
Список
Период
Сортировка
От Jordan Deitch
Тема [HACKERS] json_agg produces nonstandard json
Дата
Msg-id CAK1UM_YDJOXEyZu4c3whMV1AekOL-KekXyhY_3WVw7odsyxPcg@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] json_agg produces nonstandard json  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello!

I apologize in advanced if this has been previously discussed;

A json(b)_agg() will produce the following result when no results are passed in:

"[null]"

per:

select jsonb_agg((select 1 where false));

I believe, generally speaking, '[]' would be the more appropriate output. 

Would postgres welcome a patch to handle the empty case of json(b)_agg?

Thanks!

---
Jordan Deitch

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] CTE inlining
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] CTE inlining