Re: [HACKERS] json_agg produces nonstandard json

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

Good points. 

However, I don't see consistency between the results of these two statements:

select jsonb_agg((select 1 where false));
select sum((select 1 where false));

Therefore another option I would like to suggest is returning the same null value-types for the sum() and json_agg().

So the select jsonb_agg((select 1 where false)); would return null as opposed to [null]. In this case it would be compatible with coalesce()

---
Thanks
Jordan Deitch

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] WITH clause in CREATE STATISTICS
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] CTE inlining