public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrew Dunstan <[email protected]>
To: David G. Johnston <[email protected]>
To: Joe Conway <[email protected]>
Cc: Sehrope Sarkuni <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Davin Shearer <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Emitting JSON to file using COPY TO
Date: Thu, 7 Dec 2023 08:19:19 -0500
Message-ID: <[email protected]> (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>
	<[email protected]>
	<CALvfUkD8+bcNs1cYeU3wK9YsyZ7zUjs2aTxO+++Vq7zKeUE7+w@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CAH7T-aoWF9oHuUC2PJ303YVRFurkLMPayHawZayqdhtT2fpEHg@mail.gmail.com>
	<[email protected]>
	<CAH7T-aow6jM-v1K462O7N=doOZxSD79zsH6prDCft7wv91F48A@mail.gmail.com>
	<[email protected]>
	<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 <[email protected]> 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 (37+ messages)

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Emitting JSON to file using COPY TO
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox