pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: file_fdw: Support multi-line HEADER option.
Date: Thu, 22 Jan 2026 01:16:41 +0000
Message-ID: <E1vijJR-001tu6-0h@gemulon.postgresql.org> (raw)

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.kato@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: songjinzhou <tsinghualucky912@foxmail.com>
Reviewed-by: Japin Li <japinli@hotmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.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(-)



Message-ID: <E1vijJR-001tu6-0h@gemulon.postgresql.org>
Permalink:  ../E1vijJR-001tu6-0h@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vijJR-001tu6-0h@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: file_fdw: Support multi-line HEADER option.
  In-Reply-To: <E1vijJR-001tu6-0h@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox