Re: psql JSON output format

Поиск
Список
Период
Сортировка
От Jelte Fennema-Nio
Тема Re: psql JSON output format
Дата
Msg-id CAGECzQQD97b1sZCJ6jMF=hUnSSsqghoMZOgAyZA729590Vh50Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql JSON output format  (Christoph Berg <myon@debian.org>)
Ответы Re: psql JSON output format  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
On Mon, 18 Dec 2023 at 16:38, Christoph Berg <myon@debian.org> wrote:
> We'd want both patches even if they do the same thing on two different
> levels, I'd say.

Makes sense. One thing I was still wondering is if it wouldn't be
easier to wrap all queries in "copy (select whatever) to stdout
(format json)" automatically when the -J flag is passed psql. Because
it would be nice not to have to implement this very similar logic in
two places.

But I guess that approach does not work for commands that don't work
inside COPY, i.e. DML and DDL. I'm assuming your current patch works
fine with DML/DDL. If that's indeed the case then I agree it makes
sense to have this patch. And another big benefit is that it wouldn't
require a new Postgres server function for the json functionality of
psql.



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

Предыдущее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: Add --check option to pgindent
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: micro-optimizing json.c