Re: Emitting JSON to file using COPY TO

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Junwang Zhao <zhjwpku(at)gmail(dot)com>
Cc: Joe Conway <mail(at)joeconway(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>, Andrew Dunstan <andrew(at)dunslane(dot)net>, 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: 2025-03-11 08:23:42
Message-ID: CACJufxGmSw5GUOquAT+q7B0k+xweU3NwcNc53fLjHQjsMeanaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Sun, Mar 2, 2025 at 1:28 PM Junwang Zhao <zhjwpku(at)gmail(dot)com> wrote:
>
>
> I've refactored the patch to adapt the newly introduced CopyToRoutine struct,
> see 2e4127b6d2.
>
> v15-0001 is the merged one of v14-0001 and v14-0002
>
> There are some other ongoing *copy to/from* refactors[1] which we can benefit
> to make the code cleaner, especially the checks done in ProcessCopyOptions.
>
> [1]: https://www.postgresql.org/message-id/20250301.115009.424844407736647598.kou%40clear-code.com
>
hi.

git apply --check $PATCHES/v15-0001-Introduce-json-format-for-COPY-TO.patch
error: patch failed: src/backend/commands/copyfrom.c:155
error: src/backend/commands/copyfrom.c: patch does not apply
error: patch failed: src/backend/commands/copyto.c:176
error: src/backend/commands/copyto.c: patch does not apply

seems to need rebase.
the attachment is the rebase, minor comments tweaks, and commit message tweaks.

another issue is this patch entry in commitfest [1] status is: Not processed,
which means no cfbots CI tests, seems not great.
not sure how to resolve this issue....

[1] https://commitfest.postgresql.org/patch/4716/

Attachment Content-Type Size
v16-0002-Add-option-force_array-for-COPY-JSON-FORMAT.patch text/x-patch 9.7 KB
v16-0001-Introduce-json-format-for-COPY-TO.patch text/x-patch 30.2 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message mark bradley 2025-03-11 14:28:55 Re: Duplicate Key Values
Previous Message Achilleas Mantzios - cloud 2025-03-11 07:06:08 Re: exclusion constraint question

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-03-11 08:26:43 Re: bogus error message for ALTER TABLE ALTER CONSTRAINT
Previous Message Florents Tselai 2025-03-11 08:08:06 Re: encode/decode support for base64url