pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Andrew Dunstan <andrew@dunslane.net>
To: David G. Johnston <david.g.johnston@gmail.com>
To: Joe Conway <mail@joeconway.com>
Cc: Sehrope Sarkuni <sehrope@jackdb.com>
Cc: 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: Thu, 7 Dec 2023 08:19:19 -0500
Message-ID: <c73dc5ff-7b75-9faf-8534-9b214f214734@dunslane.net> (raw )
In-Reply-To: <CAKFQuwaw+n=FBLUXs-jPQbcrvN9Bmgu6eTM-q+GpnHpKBDUsJg@mail.gmail.com >
References: <CALvfUkBxTYy5uWPFVwpk_7ii2zgT07t3d-yR_cy4sfrrLU=kcg@mail.gmail.com >
<CALvfUkAbj4Bwg0FjYpvj0-zddcetWg1Sejt=OGBTDskbqOFS_A@mail.gmail.com >
<46cc4507-a0d9-4044-b2ce-5a8bca8015c0@joeconway.com >
<CALvfUkD8+bcNs1cYeU3wK9YsyZ7zUjs2aTxO+++Vq7zKeUE7+w@mail.gmail.com >
<2554e520-e103-8978-dcb5-807dfeb77402@dunslane.net >
<cb1f118c-4698-4451-9ba9-dd8595f06c37@joeconway.com >
<926ff917-8371-40ec-b5e6-ab7b0e09bdc5@joeconway.com >
<315b81d4-4b67-7828-0355-3808cd14acd1@dunslane.net >
<7a60faf6-e7f1-419d-aee6-10a78ea2fe81@joeconway.com >
<2e7ff718-895d-83fc-46f7-be25e23b23b4@dunslane.net >
<1104915.1701877459@sss.pgh.pa.us >
<19a5f9d8-bd1f-9e51-0f5b-510c1189a8a7@dunslane.net >
<CAH7T-aoWF9oHuUC2PJ303YVRFurkLMPayHawZayqdhtT2fpEHg@mail.gmail.com >
<4d5688f4-9582-4093-8448-e1867bc9e2bc@joeconway.com >
<CAH7T-aow6jM-v1K462O7N=doOZxSD79zsH6prDCft7wv91F48A@mail.gmail.com >
<4ad29199-361f-4740-a919-12080ad5ed65@joeconway.com >
<CAKFQuwaw+n=FBLUXs-jPQbcrvN9Bmgu6eTM-q+GpnHpKBDUsJg@mail.gmail.com >
On 2023-12-06 We 17:56, David G. Johnston wrote:
> On Wed, Dec 6, 2023 at 3:38 PM Joe Conway <mail@joeconway.com> wrote:
>
> So the questions are:
> 1. Do those two formats work for the initial implementation?
>
>
> Yes. We provide a stream-oriented format and one atomic-import format.
>
> 2. Is the default correct or should it be switched
> e.g. rather than specifying FORCE_ARRAY to get an
> array, something like FORCE_NO_ARRAY to get JSON lines
> and the JSON array is default?
>
>
> No default?
>
> Require explicit of a sub-format when the main format is JSON.
>
> JSON_OBJECT_ROWS
> JSON_ARRAY_OF_OBJECTS
>
> For a future compact array-structured-composites sub-format:
> JSON_ARRAY_OF_ARRAYS
> JSON_ARRAY_ROWS
>
>
No default seems unlike the way we treat other COPY options. I'm not
terribly fussed about which format to have as the default, but I think
we should have one.
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
view thread (163+ messages) latest in thread
Message-ID: <c73dc5ff-7b75-9faf-8534-9b214f214734@dunslane.net>
Permalink: ../c73dc5ff-7b75-9faf-8534-9b214f214734@dunslane.net/
Also on: postgresql.org/message-id/c73dc5ff-7b75-9faf-8534-9b214f214734@dunslane.net
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: andrew@dunslane.net, david.g.johnston@gmail.com, mail@joeconway.com, sehrope@jackdb.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: <c73dc5ff-7b75-9faf-8534-9b214f214734@dunslane.net>
* 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