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