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

From jian he
Subject Re: Emitting JSON to file using COPY TO
Date
Msg-id CACJufxGaoEncsv4pb+JhZLnWJ=Z4j1HQqzLV0rtiYDFFgKKx=Q@mail.gmail.com
Whole thread Raw
In response to Re: Emitting JSON to file using COPY TO  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On Fri, Feb 2, 2024 at 5:48 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> If you want the server to send this message when the JSON word is not in
> quotes, I'm afraid that's not possible, due to the funny nature of the
> FORMAT keyword when the JSON keyword appears after it.  But why do you
> care?  If you use the patch, then you no longer need to have the "not
> recognized" error messages anymore, because the JSON format is indeed
> a recognized one.
>

"JSON word is not in quotes" is my intention.

Now it seems when people implement any custom format for COPY,
if the format_name is a keyword then we need single quotes.

Thanks for clarifying!



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Emitting JSON to file using COPY TO
Next
From: Bertrand Drouvot
Date:
Subject: Re: Synchronizing slots from primary to standby