Re: Emitting JSON to file using COPY TO - Mailing list pgsql-general

From Dominique Devienne
Subject Re: Emitting JSON to file using COPY TO
Date
Msg-id CAFCRh-90_b==6aS8DFMp8z46hmBCSDm_2wS28ob4QS+=E_dyOA@mail.gmail.com
Whole thread Raw
In response to Re: Emitting JSON to file using COPY TO  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
On Mon, Nov 27, 2023 at 5:04 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 11/27/23 01:44, Dominique Devienne wrote:
> On Mon, Nov 27, 2023 at 10:33 AM Dominique Devienne <ddevienne@gmail.com
> <mailto:ddevienne@gmail.com>> wrote:
> On second thought, I guess that's COPY in its text modes doing the escaping?
> Interesting. The text-based modes of COPY are configurable. There's even
> a JSON mode.

Where are you seeing the JSON mode for COPY? AFAIK there is only text
and CSV formats.

Indeed. Somehow I thought there was...
I've used the TEXT and BINARY modes, and remembered a wishful thinking JSON mode!
OK then, if there was, then what I wrote would apply :). --DD

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Could not read from file "pg_subtrans/00F5" at offset 122880: Success.
Next
From: Dominique Devienne
Date:
Subject: Ways to aggregate table info from variable number of schemas