Make COPY format extendable: Extract COPY TO format implementations

Edit
ID 4681
Title Make COPY format extendable: Extract COPY TO format implementations
CI (CFBot) Summary
Stats (from CFBot) Patch version: v3, Patch count: 4, First patch: +273−252, All patches: +916−263
Tags SQL Commands
Created 2023-12-04 09:15:15
Last modified 2026-08-01 02:36:07 (1 month ago)
Latest email 2026-06-26 03:21:50 (2 months ago)
Status
PG20-2 (2026-09-01 – 2026-09-30): Needs review
PG20-1 (2026-07-01 – 2026-07-31): Moved to different CF
PG19-Final (2026-03-01 – 2026-04-09): Moved to different CF
PG19-4 (2026-01-01 – 2026-01-31): Moved to different CF
PG19-1 (2025-07-01 – 2025-07-31): Moved to different CF
2025-03 (2025-03-01 – 2025-04-08): Moved to different CF
2025-01 (2025-01-01 – 2025-01-31): Moved to different CF
2024-11 (2024-11-01 – 2024-11-30): Moved to different CF
2024-09 (2024-09-01 – 2024-09-30): Moved to different CF
2024-07 (2024-07-01 – 2024-07-31): Moved to different CF
2024-03 (2024-03-01 – 2024-04-08): Moved to different CF
2024-01 (2024-01-01 – 2024-01-31): Moved to different CF
Target version
Authors Kouhei Sutou (kou)
Reviewers Masahiko Sawada (masahikosawada), Zhao Junwang (zhjwpku), Hannu Krosing (hannukrosing), Yong Li (yoli) Become reviewer
Committer
Links
Emails
Make COPY format extendable: Extract COPY TO format implementations
First at 2023-12-04 06:35:48 by Sutou Kouhei <kou at clear-code.com>
Latest at 2026-06-26 03:21:50 by Sutou Kouhei <kou at clear-code.com>
Latest attachment (v3-0003-Add-an-hook-for-custom-COPY-format-option-validat.patch) at 2026-06-24 01:15:10 from Masahiko Sawada <sawada.mshk at gmail.com>
    Attachment (v3-0003-Add-an-hook-for-custom-COPY-format-option-validat.patch) at 2026-06-24 01:15:10 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: Yes)
    Attachment (v2-0002-Allow-extensions-to-register-custom-format-to-COP.patch) at 2026-06-23 01:06:07 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: Yes)
    Attachment (unknown_filename) at 2025-12-02 02:39:57 from Sutou Kouhei <kou at clear-code.com> (Patch: No)
    Attachment (copy.sh) at 2025-11-17 17:04:46 from Tomas Vondra <tomas at vondra.me> (Patch: No)
    Attachment (0003-Support-custom-COPY-format-for-COPY-FROM-and-COPY-TO.patch) at 2025-11-14 20:19:47 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: Yes)
    Attachment (0001-Split-CopyToStateData-to-CopyToState-Builtin-Data.patch) at 2025-10-14 02:15:24 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (0001-Split-CopyToStateData-to-CopyToState-Internal-Builti.patch) at 2025-10-03 07:06:50 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (0001-Split-CopyToStateData-to-CopyToStateData-and-CopyToS.patch) at 2025-08-14 06:36:54 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (0001-Refactor-CopyToStateData-and-CopyFromStateData.patch) at 2025-07-13 18:28:16 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: Yes)
    Attachment (v42-0001-Export-CopyDest-as-private-data.patch) at 2025-06-25 07:35:47 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v41-0001-Export-CopyDest-as-private-data.patch) at 2025-06-18 03:59:20 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v40-0001-Export-CopyDest-as-private-data.patch) at 2025-04-25 12:45:34 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v39-0001-Export-CopyDest-as-private-data.patch) at 2025-03-27 03:28:40 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v38-0001-Add-support-for-adding-custom-COPY-TO-format.patch) at 2025-03-20 01:24:55 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v37-0001-Add-support-for-adding-custom-COPY-TO-format.patch) at 2025-03-19 02:56:17 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v36-0001-Add-support-for-adding-custom-COPY-TO-format.patch) at 2025-03-05 00:06:08 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v2-0001-Refactor-Copy-From-To-GetRoutine-to-use-pass-by-r.patch) at 2025-03-03 19:06:39 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: Yes)
    Attachment (0001-Use-const-pointer-for-CopyFormatOptions-for-Copy-To-.patch) at 2025-03-03 00:19:12 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v35-0001-Add-support-for-adding-custom-COPY-TO-format.patch) at 2025-03-01 02:50:09 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v34-0002-Refactor-COPY-FROM-to-use-format-callback-functi.patch) at 2025-02-26 01:14:43 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: Yes)
    Attachment (v33-0002-Refactor-COPY-FROM-to-use-format-callback-functi.patch) at 2025-02-25 22:05:28 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: Yes)
    Attachment (v31-intel-core-i7-3770-result-1-2.pdf) at 2025-02-07 13:01:17 from Sutou Kouhei <kou at clear-code.com> (Patch: No)
    Attachment (v32-0001-Refactor-COPY-TO-to-use-format-callback-function.patch) at 2025-02-06 12:06:31 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v31-0001-Refactor-COPY-TO-to-use-format-callback-function.patch) at 2025-02-01 10:12:01 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v30-0001-Refactor-COPY-TO-to-use-format-callback-function.patch) at 2025-01-31 23:10:23 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (fix_format_option_process.patch) at 2025-01-31 22:25:34 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: Yes)
    Attachment (v29-0001-Refactor-COPY-TO-to-use-format-callback-function.patch) at 2025-01-30 15:42:13 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v28-0001-Refactor-COPY-TO-to-use-format-callback-function.patch) at 2025-01-23 09:12:10 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v27-0001-Refactor-COPY-TO-to-use-format-callback-function.patch) at 2024-11-27 07:53:44 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v26-0001-Refactor-COPY-TO-to-use-format-callback-function.patch) at 2024-11-25 06:01:50 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v25-0002-Refactor-COPY-FROM-to-use-format-callback-functi.patch) at 2024-11-22 21:01:06 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: Yes)
    Attachment (copy-headersfix.patch) at 2024-11-21 10:41:18 from Alvaro Herrera <alvherre at alvh.no-ip.org> (Patch: Yes)
    Attachment (v24-0002-fixup-fixup-minor-updates-for-COPY-TO-refactorin.patch) at 2024-11-20 22:14:27 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: Yes)
    Attachment (v20-intel-core-i7-3770-result.pdf) at 2024-11-14 07:19:48 from Sutou Kouhei <kou at clear-code.com> (Patch: No)
    Attachment (v22-0001-Add-CopyToRoutine-CopyFromRountine.patch) at 2024-11-05 08:43:28 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (results_v20.pdf) at 2024-11-05 06:19:07 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: No)
    Attachment (v19-intel-core-i7-3770-result.pdf) at 2024-10-08 08:39:18 from Sutou Kouhei <kou at clear-code.com> (Patch: No)
    Attachment (extensible_copy_benchmark_20241007.pdf) at 2024-10-07 22:23:08 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: No)
    Attachment (v20-0001-Add-CopyToRoutine-CopyFromRountine.patch) at 2024-09-28 15:56:45 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v19-ryzen-9-3900x-result.pdf) at 2024-08-04 22:20:12 from Sutou Kouhei <kou at clear-code.com> (Patch: No)
    Attachment (intel-core-i7-result.pdf) at 2024-08-01 10:54:12 from Sutou Kouhei <kou at clear-code.com> (Patch: No)
    Attachment (copy-benchmark-per-patch.pdf) at 2024-07-30 09:51:37 from Tomas Vondra <tomas.vondra at enterprisedb.com> (Patch: No)
    Attachment (unknown_filename) at 2024-07-30 07:13:06 from Sutou Kouhei <kou at clear-code.com> (Patch: No)
    Attachment (copy-benchmark.pdf) at 2024-07-29 12:17:08 from Tomas Vondra <tomas.vondra at enterprisedb.com> (Patch: No)
    Attachment (v18-0001-Add-CopyFromRoutine-CopyToRountine.patch) at 2024-07-24 08:30:59 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v17-0001-Add-CopyFromRoutine-CopyToRountine.patch) at 2024-03-05 08:18:08 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v16-0001-Add-CopyFromRoutine-CopyToRountine.patch) at 2024-03-04 05:11:08 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v15-0001-Extract-COPY-FROM-TO-format-implementations.patch) at 2024-02-22 06:44:16 from Michael Paquier <michael at paquier.xyz> (Patch: Yes)
    Attachment (v2-0001-Reuse-fcinfo-used-in-COPY-FROM.patch) at 2024-02-15 06:34:21 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (prepare-callinfo.diff) at 2024-02-13 08:33:40 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (remove-copy-read-attributes.diff) at 2024-02-09 07:32:05 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v14-0001-Extract-COPY-FROM-TO-format-implementations.patch) at 2024-02-09 04:21:34 from Michael Paquier <michael at paquier.xyz> (Patch: Yes)
    Attachment (blackhole_am.tar.gz) at 2024-02-09 00:54:53 from Michael Paquier <michael at paquier.xyz> (Patch: No)
    Attachment (v13a-0001-WIP-COPY-TO-remove-unnecessary-and-ineffective-.patch) at 2024-02-06 23:33:36 from Andres Freund <andres at anarazel.de> (Patch: Yes)
    Attachment (v13-0001-Extract-COPY-FROM-TO-format-implementations.patch) at 2024-02-06 02:41:06 from Michael Paquier <michael at paquier.xyz> (Patch: Yes)
    Attachment (v13-0001-Extract-COPY-FROM-TO-format-implementations.patch) at 2024-02-05 23:48:55 from Michael Paquier <michael at paquier.xyz> (Patch: Yes)
    Attachment (v12-0001-Extract-COPY-FROM-TO-format-implementations.patch) at 2024-02-05 07:14:08 from Michael Paquier <michael at paquier.xyz> (Patch: Yes)
    Attachment (v11-0001-Extract-COPY-FROM-TO-format-implementations.patch) at 2024-02-02 06:21:31 from Michael Paquier <michael at paquier.xyz> (Patch: Yes)
    Attachment (v10-0001-Extract-COPY-TO-format-implementations.patch) at 2024-01-31 05:11:22 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v9-0001-Extract-COPY-TO-format-implementations.patch) at 2024-01-29 09:45:23 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v8-0004-Add-support-for-implementing-custom-COPY-TO-forma.patch) at 2024-01-27 06:15:02 from Junwang Zhao <zhjwpku at gmail.com> (Patch: Yes)
    Attachment (v7-0001-Extract-COPY-TO-format-implementations.patch) at 2024-01-26 08:49:47 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (0001-add-check-incomptiblity-options-hooks.patch) at 2024-01-26 08:18:14 from Junwang Zhao <zhjwpku at gmail.com> (Patch: Yes)
    Attachment (add_callback_for_csv_format.patch) at 2024-01-25 04:36:03 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: Yes)
    Attachment (bench-run.txt) at 2024-01-25 03:17:55 from Michael Paquier <michael at paquier.xyz> (Patch: No)
    Attachment (v6-0001-Extract-COPY-TO-format-implementations.patch) at 2024-01-24 05:49:36 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v2-custom_copy_format_draft.diff) at 2023-12-21 09:35:04 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (custom_copy_format_draft.patch) at 2023-12-11 14:31:29 from Masahiko Sawada <sawada.mshk at gmail.com> (Patch: Yes)
    Attachment (Cloud-friendly COPY.pdf) at 2023-12-09 11:38:46 from Hannu Krosing <hannuk at google.com> (Patch: No)
    Attachment (v5-0001-Extract-COPY-handlers.patch) at 2023-12-08 02:32:27 from Junwang Zhao <zhjwpku at gmail.com> (Patch: Yes)
    Attachment (v4-0001-Extract-COPY-handlers.patch) at 2023-12-06 14:07:51 from Junwang Zhao <zhjwpku at gmail.com> (Patch: Yes)
    Attachment (v3-0001-Extract-COPY-TO-format-implementations.patch) at 2023-12-06 07:28:34 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v2-0001-Extract-COPY-TO-format-implementations.patch) at 2023-12-06 06:19:08 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
    Attachment (v1-0001-Extract-COPY-TO-format-implementations.patch) at 2023-12-04 06:35:48 from Sutou Kouhei <kou at clear-code.com> (Patch: Yes)
History
When Who What
2026-09-01 20:56:49 Hannu Krosing (hannukrosing) Added hannukrosing as reviewer
2026-08-01 02:36:07 Kouhei Sutou (kou) Moved from CF PG20-1 to CF PG20-2
2026-06-23 01:33:36 CFbot Patch does not need rebase anymore
2026-04-01 00:26:14 Kouhei Sutou (kou) Moved from CF PG19-Final to CF PG20-1
2026-02-01 04:32:24 Kouhei Sutou (kou) Moved from CF PG19-4 to CF PG19-Final
2025-12-10 12:15:25 CFbot Patch needs rebase
2025-11-14 20:39:30 CFbot Patch does not need rebase anymore
2025-11-11 01:35:25 CFbot Patch needs rebase
2025-11-11 01:30:06 Kouhei Sutou (kou) Moved from CF PG19-1 to CF PG19-4
2025-06-23 02:04:02 CFbot Patch does not need rebase anymore
2025-06-23 02:00:38 Kouhei Sutou (kou) New status: Needs review
2025-06-23 02:00:04 Kouhei Sutou (kou) Moved from CF 2025-03 to CF PG19-1
2025-06-09 16:01:44 Nathan Bossart (bossartn) Removed bossartn from reviewers
2025-03-29 22:30:47 CFbot Patch needs rebase
2025-03-17 20:50:44 Masahiko Sawada (masahikosawada) New status: Waiting on Author
2025-02-03 22:20:04 Masahiko Sawada (masahikosawada) Closed in commitfest 2025-01 with status: Moved to next CF
2024-12-10 06:54:24 Michael Paquier (michael-kun) Closed in commitfest 2024-11 with status: Moved to next CF
2024-10-08 03:33:14 Michael Paquier (michael-kun) Closed in commitfest 2024-09 with status: Moved to next CF
2024-08-01 06:20:45 Corey Huinker (coreyh) Closed in commitfest 2024-07 with status: Moved to next CF
2024-07-22 06:45:26 Yong Li (yoli) Added yoli as reviewer
2024-04-09 06:18:34 Andrey Borodin (x4m) Closed in commitfest 2024-03 with status: Moved to next CF
2024-03-06 06:20:17 Michael Paquier (michael-kun) Removed michael-kun from committers
2024-03-06 00:48:59 Kouhei Sutou (kou) New status: Needs review
2024-03-05 06:16:54 Michael Paquier (michael-kun) New status: Waiting on Author
2024-02-09 04:41:23 Michael Paquier (michael-kun) New status: Ready for Committer
2024-02-01 10:46:11 vigneshwaran C (vignesh.postgres) Closed in commitfest 2024-01 with status: Moved to next CF
2024-02-01 04:22:20 Michael Paquier (michael-kun) New status: Waiting on Author
2024-01-31 09:59:54 Zhao Junwang (zhjwpku) Added zhjwpku as reviewer
2024-01-29 09:45:49 Kouhei Sutou (kou) New status: Needs review
2024-01-25 07:15:44 Michael Paquier (michael-kun) Added michael-kun as committer
2024-01-25 07:15:42 Michael Paquier (michael-kun) New status: Waiting on Author
2023-12-14 01:35:24 Masahiko Sawada (masahikosawada) Added masahikosawada as reviewer
2023-12-05 18:25:04 Nathan Bossart (bossartn) Added bossartn as reviewer
2023-12-04 09:58:15 Kouhei Sutou (kou) Changed authors to Kouhei Sutou (kou)
2023-12-04 09:15:16 Kouhei Sutou (kou) Attached mail thread 20231204.153548.2126325458835528809.kou@clear-code.com
2023-12-04 09:15:15 Kouhei Sutou (kou) Created patch record
Edit