Re: [HACKERS] json_agg produces nonstandard json
От
Jordan Deitch
Тема
Re: [HACKERS] json_agg produces nonstandard json
Дата
Msg-id
CAK1UM_b1PZGXPfEjjfQo8i_eLck56SHepPLQ0rHFPeKY9XaMwg@mail.gmail.com
Ответ на
Список
Дерево обсуждения
[HACKERS] json_agg produces nonstandard json Jordan Deitch <jwdeitch@gmail.com>
Re: [HACKERS] json_agg produces nonstandard json Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] json_agg produces nonstandard json Jordan Deitch <jwdeitch@gmail.com>
Re: [HACKERS] json_agg produces nonstandard json Tom Lane <tgl@sss.pgh.pa.us>
Thank you for responding!
select jsonb_agg((select 1 where false));
select sum((select 1 where false));
Good points.
However, I don't see consistency between the results of these two statements:
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 по дате отправления
От: Robert Haas
Дата: