| From: | Fujii Masao <fujii(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: file_fdw: Support multi-line HEADER option. |
| Date: | 2026-01-22 01:16:41 |
| Message-ID: | E1vijJR-001tu6-0h@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
file_fdw: Support multi-line HEADER option.
Commit bc2f348 introduced multi-line HEADER support for COPY. This commit
extends this capability to file_fdw, allowing multiple header lines to be
skipped.
Because CREATE/ALTER FOREIGN TABLE requires option values to be single-quoted,
this commit also updates defGetCopyHeaderOption() to accept integer values
specified as strings for HEADER option.
Author: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: songjinzhou <tsinghualucky912(at)foxmail(dot)com>
Reviewed-by: Japin Li <japinli(at)hotmail(dot)com>
Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAOzEurT+iwC47VHPMS+uJ4WSzvOLPsZ2F2_wopm8M7O+CZa3Xw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/26cb14aea12a0f0c2f9a49de3865721936b711a7
Modified Files
--------------
contrib/file_fdw/data/multiline_header.csv | 4 ++
contrib/file_fdw/expected/file_fdw.out | 29 +++++++++++++-
contrib/file_fdw/sql/file_fdw.sql | 13 +++++++
doc/src/sgml/file-fdw.sgml | 4 +-
src/backend/commands/copy.c | 62 +++++++++++++++++-------------
src/test/regress/expected/copy.out | 18 +++++++++
src/test/regress/expected/copy2.out | 6 +++
src/test/regress/sql/copy.sql | 15 ++++++++
src/test/regress/sql/copy2.sql | 3 ++
9 files changed, 125 insertions(+), 29 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Munro | 2026-01-22 03:28:41 | pgsql: jit: Add missing inline pass for LLVM >= 17. |
| Previous Message | Peter Smith | 2026-01-21 22:22:19 | Re: pgsql: tests: Add a test C++ extension module |