From: | Christoph Berg <myon(at)debian(dot)org> |
---|---|
To: | Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: psql JSON output format |
Date: | 2023-12-18 15:38:05 |
Message-ID: | ZYBnXdB_UJebyeKg@msg.df7cb.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tristan Partin | 2023-12-18 15:45:05 | Re: Add --check option to pgindent |
Previous Message | Matt Skelley | 2023-12-18 15:26:40 | Re: A wrong comment about search_indexed_tlist_for_var |