Re: psql JSON output format - Mailing list pgsql-hackers

From Christoph Berg
Subject Re: psql JSON output format
Date
Msg-id ZYBnXdB_UJebyeKg@msg.df7cb.de
Whole thread Raw
In response to Re: psql JSON output format  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Responses Re: psql JSON output format
List pgsql-hackers
Re: Jelte Fennema-Nio
> This seems useful to me too, but my usecases would also be solved (and
> possibly better solved) by adding JSON support to COPY as proposed
> here:
https://www.postgresql.org/message-id/flat/CALvfUkBxTYy5uWPFVwpk_7ii2zgT07t3d-yR_cy4sfrrLU%3Dkcg%40mail.gmail.com

Thanks for the pointer, I had not scrolled back enough to see that
thread.

I'm happy to see that this patch is also settling on "array of
objects".

> I'm wondering if your follow-up patch would be better served by that too or not.

I'd need it to work on query results. Which could of course be wrapped
into "copy (select whatever) to stdout (format json)", but doing it in
psql without mangling the query is cleaner. And (see the other mail),
the psql format selection works nicely with existing queries like
`psql -l`.

And "copy format json" wouldn't support \x expanded mode.

We'd want both patches even if they do the same thing on two different
levels, I'd say.

Christoph



pgsql-hackers by date:

Previous
From: Matt Skelley
Date:
Subject: Re: A wrong comment about search_indexed_tlist_for_var
Next
From: "Tristan Partin"
Date:
Subject: Re: Add --check option to pgindent