Re: psql JSON output format

Поиск
Список
Период
Сортировка
От Stefan Keller
Тема Re: psql JSON output format
Дата
Msg-id CAFcOn2_fOjdyEhLkqFnSgRmY40g-v1jB8oDtZpZpQtSJEDC3JQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql JSON output format  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: psql JSON output format  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: psql JSON output format  (Christoph Berg <myon@debian.org>)
Список pgsql-hackers
Am Di., 23. Jan. 2024 um 15:15 Uhr schrieb Laurenz Albe
<laurenz.albe@cybertec.at>:
> I understand the motivation, but I bet it's not what will make users
> happy.
>
> If you need to disambiguate between SQL NULL and JSON null, my
> preferred solution would be to omit SQL NULL columns from the output
> altogether.

I fully support Laurenz's proposal and argumentation. The main use
case for such a JSON output feature is further processing somewhere
else.

--Stefan

Am Di., 23. Jan. 2024 um 15:15 Uhr schrieb Laurenz Albe
<laurenz.albe@cybertec.at>:
>
> On Mon, 2024-01-22 at 16:19 +0100, Christoph Berg wrote:
> > What I did now in v3 of this patch is to print boolean and numeric
> > values (ints, floats, numeric) without quotes, while adding the quotes
> > back to json. This solves the NULL vs 'null'::json problem.
>
> The patch is working as advertised.
>
> I am kind of unhappy about this change.  It seems awkward and undesirable
> so have JSON values decorated with weird quoting in JSON output.
> I understand the motivation, but I bet it's not what will make users
> happy.
>
> If you need to disambiguate between SQL NULL and JSON null, my
> preferred solution would be to omit SQL NULL columns from the output
> altogether.
>
> Yours,
> Laurenz Albe
>
>



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

Предыдущее
От: Akshat Jaimini
Дата:
Сообщение: Re: Parallelize correlated subqueries that execute within each worker
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: make BuiltinTrancheNames less ugly