Re: file_fdw: Support multi-line HEADER option.

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: file_fdw: Support multi-line HEADER option.
Date: 2026-01-20 14:09:51
Message-ID: CAHGQGwGWyApGA0L-uE819xeinwSonPXQfV1diBUCkR+AcgxuOw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 20, 2026 at 1:17 PM Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> wrote:
> Thank you! I was struggling with how to write it cleanly, but the code
> you suggested is clear and easy to understand.

Thanks for updating the patch!

I've applied the cosmetic changes and attached updated versions of the patches.

Regarding 0001 patch:

- errmsg("%s requires a Boolean value, a
non-negative integer, "
- "or the string \"match\"",
+ errmsg("%s requires a Boolean value, an
integer greater than or "
+ "equal to zero, or the string
\"match\"",

I added the word "value" after "integer" in the error message.

Regarding 0002 patch:

* Allow 0, 1, "true", "false", "on", "off", an integer greater than or
- * equal to zero, or "match".
+ * equal to zero (also as a string, to support file_fdw options), or
+ * "match".

I updated the comment to more clearly list the values handled by
defGetCopyHeaderOption(). With the latest patch, the comment is:

Allow an integer value greater than or equal to zero (integers
specified as strings are also accepted, mainly for file_fdw foreign
table options), or "true", "false", "on", "off", or "match".

I'm thinking to commit the attached patches.

Regards,

--
Fujii Masao

Attachment Content-Type Size
v5-0001-Improve-the-error-message-in-COPY-with-HEADER-opt.patch application/octet-stream 4.0 KB
v5-0002-file_fdw-Support-multi-line-HEADER-option.patch application/octet-stream 12.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2026-01-20 14:16:08 Re: file_fdw: Support multi-line HEADER option.
Previous Message vignesh C 2026-01-20 13:18:22 Re: Proposal: Conflict log history table for Logical Replication