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 1r9V4x-0005GO-Ou for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Dec 2023 18:51:03 +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 1r9V4v-00BAC0-AO for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Dec 2023 18:51:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r9V4u-00BABr-UK for pgsql-hackers@lists.postgresql.org; Sat, 02 Dec 2023 18:51:01 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r9V4k-008TPl-Ke for pgsql-hackers@postgresql.org; Sat, 02 Dec 2023 18:50:59 +0000 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-28648be0811so2174159a91.0 for ; Sat, 02 Dec 2023 10:50:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701543049; x=1702147849; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vQsznPpjv87a/XhyViCqUaPBuQat1zmRrOWL0YZ7V54=; b=MZoAOhkrnTbujzDjYP8LobHVa+Wwt87tZbdSfo9JhO9HLxZCIOdb0U0e0+MgcYnH+1 eNFhad3Wi83T9rZSOKoVn7XV7eCUh4g3TAfUzWqS9ppo7nmfJULYLSosa65LcTSv6eDp ZHQtOe9xyfhlRFKOyC9H9oA24IaGKjbStRTkb3IHkFDQkejWfWyxaC640ZQMT+0oNAfR +li8UpwGkDDMXyFt7HgzTJwKzQM7OxbGfKQqFxpuXwlfEWSxEAsIGxmLUQ23ssiaOJtf S5R7bUHNhef9ZcHDzOTqA4CjcJwuPeugVTeitlTiBc6dVCHMB+ZGyjPgsuorP8GijfT8 Jh1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701543049; x=1702147849; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vQsznPpjv87a/XhyViCqUaPBuQat1zmRrOWL0YZ7V54=; b=nTbXAwAbdlHe6OjMWWRlWrezvFlz+pzgKAW62RX6Y/UXz/B9Z6GkGRA0K2uywJ3wX2 wzqMSvhUrxHZwQlBVgM0+0cAikJqt1e2byj8FzvNfEskkXGTledxOictV8IVn5KOucMl wkTuEB0lEPZyHjkDCB80ApXpMGOTI0jxaNt+mqiOYcEqtc2EHPQ6ZbvJW1ZVGfxq9ygI dAznko4tT1rJ0365dWN1e+R76B+2XBchwv0yrzcJ27rrxVLTbTm9/kMPMvMjjJP6Ujku PfsrN7IlmdSo7QgMO3sVsts01jVp8OQUwYHP+FTjWkMJ27QtxDYmwW7/VVmaE2Wl2PvH xAuQ== X-Gm-Message-State: AOJu0YwiXvhQsWaRh1E3zhMUJmWMVUJnvhBSur6Ln6xsUVqJdAoVzqwV 7sG3He2fKb/GcCjiw937+Yr3SeT210H4eZzfoFc= X-Google-Smtp-Source: AGHT+IHe4lz1JZwXUEtkKxKZj7/0fVQf2mFrT+A0zV0sQ4KwlS9IUe9vdPXum2Gk6hZPv8U9VMASwz3b8wW98xbWyxs= X-Received: by 2002:a17:90b:17c8:b0:285:81aa:aec0 with SMTP id me8-20020a17090b17c800b0028581aaaec0mr793660pjb.12.1701543049345; Sat, 02 Dec 2023 10:50:49 -0800 (PST) MIME-Version: 1.0 References: <3853387.1701096982@sss.pgh.pa.us> <3a98decf-3fe3-4b49-9b68-fda01338872c@sedlakovi.org> <24e3ee88-ec1e-421b-89ae-8a47ee0d2df1@joeconway.com> In-Reply-To: <24e3ee88-ec1e-421b-89ae-8a47ee0d2df1@joeconway.com> From: Maciek Sakrejda Date: Sat, 2 Dec 2023 10:50:12 -0800 Message-ID: Subject: Re: Emitting JSON to file using COPY TO To: Joe Conway Cc: Davin Shearer , PostgreSQL-development Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Dec 1, 2023 at 11:32=E2=80=AFAM Joe Conway wro= te: > 1. Is supporting JSON array format sufficient, or does it need to > support some other options? How flexible does the support scheme need to = be? "JSON Lines" is a semi-standard format [1] that's basically just newline-separated JSON values. (In fact, this is what log_destination=3Djsonlog gives you for Postgres logs, no?) It might be worthwhile to support that, too. [1]: https://jsonlines.org/