Re: Emitting JSON to file using COPY TO

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Dominique Devienne <ddevienne(at)gmail(dot)com>
Cc: Davin Shearer <scholarsmate(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Emitting JSON to file using COPY TO
Date: 2023-11-27 16:04:05
Message-ID: a270aba3-899c-4972-b9b8-95a6228626e4@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 11/27/23 01:44, Dominique Devienne wrote:
> On Mon, Nov 27, 2023 at 10:33 AM Dominique Devienne <ddevienne(at)gmail(dot)com
> <mailto:ddevienne(at)gmail(dot)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.

> By miracle, would the JSON output mode recognize JSON[B] values, and
> avoid the escaping?
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2023-11-27 16:12:12 Re: Could not read from file "pg_subtrans/00F5" at offset 122880: Success.
Previous Message Ron Johnson 2023-11-27 15:27:41 Re: Parallel Index Scan Implementation

Browse pgsql-hackers by date

  From Date Subject
Next Message Dominique Devienne 2023-11-27 16:14:46 Re: Emitting JSON to file using COPY TO
Previous Message Heikki Linnakangas 2023-11-27 15:55:34 Re: walwriter interacts quite badly with synchronous_commit=off