Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAbRO-007Mjl-Hd for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Dec 2023 19:50:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rAbRM-005jDI-J4 for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Dec 2023 19:50:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAbRM-005jDA-9E for pgsql-hackers@lists.postgresql.org; Tue, 05 Dec 2023 19:50:44 +0000 Received: from mxout1-ec2-va.apache.org ([3.227.148.255]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAbRH-00AGns-Vl for pgsql-hackers@postgresql.org; Tue, 05 Dec 2023 19:50:42 +0000 Received: from mail.apache.org (mailgw-he-de.apache.org [116.203.246.181]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with ESMTPS id A8B393F266 for ; Tue, 5 Dec 2023 19:50:37 +0000 (UTC) Received: (qmail 2556333 invoked by uid 116); 5 Dec 2023 19:50:36 -0000 Received: from ec2-52-204-25-47.compute-1.amazonaws.com (HELO mailrelay1-ec2-va.apache.org) (52.204.25.47) by apache.org (qpsmtpd/0.94) with ESMTP; Tue, 05 Dec 2023 19:50:36 +0000 Authentication-Results: apache.org; auth=none Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mailrelay1-ec2-va.apache.org (ASF Mail Server at mailrelay1-ec2-va.apache.org) with ESMTPSA id 1C2083FCCB for ; Tue, 5 Dec 2023 19:50:36 +0000 (UTC) Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-28647f4ebd9so4079098a91.3 for ; Tue, 05 Dec 2023 11:50:36 -0800 (PST) X-Gm-Message-State: AOJu0YwvAwiedLU5DvLl1VDPA2a+ki059WPkgwKwGbciwe9l8GD4GJHg Q6Zey+9eD/v7bQuHWxyvMK/5UY+BQfWZJGDeX10= X-Google-Smtp-Source: AGHT+IFryD9spmbrwq2qh3Yx+o+aiLPXAEwdxZFRM8TYFa/p0E6uM/IUhdM6ihSuxZLObQ95fauGmbs3DQpuyZYKBqA= X-Received: by 2002:a17:90a:ea05:b0:286:6cc1:5fe0 with SMTP id w5-20020a17090aea0500b002866cc15fe0mr1448521pjy.99.1701805835160; Tue, 05 Dec 2023 11:50:35 -0800 (PST) MIME-Version: 1.0 References: <7117a356-916c-4cf3-bad8-861490e65dcf@joeconway.com> <9c77b6fa-ee88-b2e6-0fa7-4fc81721da35@dunslane.net> <41dcba92-1075-e5e5-cb99-36711abf6cec@dunslane.net> <5c84b70b-ba18-c45d-dbbe-612fa229b2ce@dunslane.net> <398c22f6-4299-4b17-80bf-2f14f4afd592@joeconway.com> <46cc4507-a0d9-4044-b2ce-5a8bca8015c0@joeconway.com> In-Reply-To: <46cc4507-a0d9-4044-b2ce-5a8bca8015c0@joeconway.com> From: Davin Shearer Date: Tue, 5 Dec 2023 14:50:23 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Emitting JSON to file using COPY TO To: PostgreSQL-development Cc: Andrew Dunstan , Joe Conway Content-Type: multipart/alternative; boundary="00000000000048149b060bc88c1e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000048149b060bc88c1e Content-Type: text/plain; charset="UTF-8" Hi Joe, In reviewing the 005 patch, I think that when used with FORCE ARRAY, we should also _imply_ FORCE ROW DELIMITER. I can't envision a use case where someone would want to use FORCE ARRAY without also using FORCE ROW DELIMITER. I can, however, envision a use case where someone would want FORCE ROW DELIMITER without FORCE ARRAY, like maybe including into a larger array. I definitely appreciate these options and the flexibility that they afford from a user perspective. In the test output, will you also show the different variations with FORCE ARRAY and FORCE ROW DELIMITER => {(false, false), (true, false), (false, true), (true, true)}? Technically you've already shown me the (false, false) case as those are the defaults. Thanks! --00000000000048149b060bc88c1e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Joe,

In reviewing t= he 005 patch, I think that when used with FORCE ARRAY, we should also _impl= y_ FORCE ROW DELIMITER.=C2=A0 I can't envision a use case where someone= would want to use FORCE ARRAY without also using FORCE ROW DELIMITER.=C2= =A0 I can, however, envision a use case where someone would want FORCE ROW = DELIMITER without FORCE ARRAY,=C2=A0like maybe including into a larger arra= y.=C2=A0 I definitely appreciate these options and the flexibility that the= y afford from=C2=A0a user perspective.

In the test= output, will you also show the different variations with FORCE ARRAY and F= ORCE ROW DELIMITER =3D> {(false, false), (true, false), (false, true), (= true, true)}?=C2=A0 Technically you've already shown me the (false, fal= se) case as those are the defaults.

Thanks!
<= /div>
--00000000000048149b060bc88c1e--