pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Joe Conway <mail@joeconway.com>
To: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Davin Shearer <davin@apache.org>
Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: Emitting JSON to file using COPY TO
Date: Sat, 2 Dec 2023 17:37:48 -0500
Message-ID: <4a3e4b0d-0fa8-4700-8e9b-e541a040df71@joeconway.com> (raw )
In-Reply-To: <20231202215320.GA1855278@nathanxps13 >
References: <CAFCRh--Vhx0105S7SWAYHGcVMTSRtbcoArDUGSbYSWRUGunW_g@mail.gmail.com >
<CAKFQuwZb3zaSqkOvGXRRLZEW61az+4xyHZ7tBPR91JfrcdCKvA@mail.gmail.com >
<3853387.1701096982@sss.pgh.pa.us >
<CAFCRh-_GdiUvjd5z5FfvTfhruOnYqBu163XU47zZE8RNATCJGQ@mail.gmail.com >
<3a98decf-3fe3-4b49-9b68-fda01338872c@sedlakovi.org >
<CALvfUkCq3pvkmniWEKZwkbA6hNNvkANF3OamMfhC170RgY+HJg@mail.gmail.com >
<24e3ee88-ec1e-421b-89ae-8a47ee0d2df1@joeconway.com >
<20231201230958.GA1786735@nathanxps13 >
<411395e0-697e-44ab-be98-dd2047f9a10e@joeconway.com >
<398150.1701529880@sss.pgh.pa.us >
<20231202215320.GA1855278@nathanxps13 >
On 12/2/23 16:53, Nathan Bossart wrote:
> On Sat, Dec 02, 2023 at 10:11:20AM -0500, Tom Lane wrote:
>> So if you are writing a production that might need to match
>> FORMAT followed by JSON, you need to match FORMAT_LA too.
>
> Thanks for the pointer. That does seem to be the culprit.
>
> diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
> index d631ac89a9..048494dd07 100644
> --- a/src/backend/parser/gram.y
> +++ b/src/backend/parser/gram.y
> @@ -3490,6 +3490,10 @@ copy_generic_opt_elem:
> {
> $$ = makeDefElem($1, $2, @1);
> }
> + | FORMAT_LA copy_generic_opt_arg
> + {
> + $$ = makeDefElem("format", $2, @1);
> + }
> ;
>
> copy_generic_opt_arg:
Yep -- I concluded the same. Thanks Tom!
--
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
view thread (163+ messages) latest in thread
Message-ID: <4a3e4b0d-0fa8-4700-8e9b-e541a040df71@joeconway.com>
Permalink: ../4a3e4b0d-0fa8-4700-8e9b-e541a040df71@joeconway.com/
Also on: postgresql.org/message-id/4a3e4b0d-0fa8-4700-8e9b-e541a040df71@joeconway.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-general@postgresql.org
Cc: mail@joeconway.com, nathandbossart@gmail.com, tgl@sss.pgh.pa.us, davin@apache.org, pgsql-hackers@postgreSQL.org
Subject: Re: Emitting JSON to file using COPY TO
In-Reply-To: <4a3e4b0d-0fa8-4700-8e9b-e541a040df71@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox