Re: Emitting JSON to file using COPY TO

From: Joe Conway <mail(at)joeconway(dot)com>
To: Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>
Cc: Davin Shearer <davin(at)apache(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Emitting JSON to file using COPY TO
Date: 2023-12-02 22:43:52
Message-ID: 70055855-8ea1-43dc-85c2-630b8cf3bbbd@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 12/2/23 13:50, Maciek Sakrejda wrote:
> On Fri, Dec 1, 2023 at 11:32 AM Joe Conway <mail(at)joeconway(dot)com> wrote:
>> 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=jsonlog gives you for Postgres logs, no?) It might be
> worthwhile to support that, too.
>
> [1]: https://jsonlines.org/

Yes, I have seen examples of that associated with other databases (MSSQL
and Duckdb at least) as well. It probably makes sense to support that
format too.

--
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Dunstan 2023-12-03 13:46:28 Re: Emitting JSON to file using COPY TO
Previous Message Joe Conway 2023-12-02 22:37:48 Re: Emitting JSON to file using COPY TO

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-12-02 22:46:39 Re: Is WAL_DEBUG related code still relevant today?
Previous Message Joe Conway 2023-12-02 22:37:48 Re: Emitting JSON to file using COPY TO