Re: Emitting JSON to file using COPY TO

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Joe Conway <mail(at)joeconway(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Junwang Zhao <zhjwpku(at)gmail(dot)com>
Cc: Florents Tselai <florents(dot)tselai(at)gmail(dot)com>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Daniel Verite <daniel(at)manitou-mail(dot)org>, 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: 2026-03-05 20:49:55
Message-ID: 8154f8e2-7d9c-442f-a7cb-a5caf38f6a12@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

>

On 2026-03-05 Th 1:06 PM, Joe Conway wrote:
>>
>>
>> Then I reworked the way this works. In order to support column lists
>> with JSON output, we need to deal with individual columns instead of
>> whole records. This involved quite a number of changes, as can be
>> seen in patch 4. This involved exporting a new small function from
>> json.c.
>>
>> The result is a lot cleaner, I believe, and in my benchmarking is
>> faster by a factor of almost 2.
>
> Andrew,
>
> I don't see the actual patches. Did I miss it somewhere?

Nope. Bad hair day apparently.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachment Content-Type Size
v25-0001-introduce-CopyFormat-refactor-CopyFormatOptions.patch text/x-patch 13.1 KB
v25-0002-json-format-for-COPY-TO.patch text/x-patch 22.2 KB
v25-0003-Add-option-force_array-for-COPY-JSON-FORMAT.patch text/x-patch 10.7 KB
v25-0004-COPY-TO-JSON-build-JSON-per-column-support-colum.patch text/x-patch 13.3 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message jian he 2026-03-06 09:38:30 Re: Emitting JSON to file using COPY TO
Previous Message Joe Conway 2026-03-05 18:06:37 Re: Emitting JSON to file using COPY TO

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2026-03-05 21:01:07 Re: Why clearing the VM doesn't require registering vm buffer in wal record
Previous Message Madhav Madhusoodanan 2026-03-05 20:45:31 Re: [WiP] B-tree page merge during vacuum to reduce index bloat