Re: file_fdw: Support multi-line HEADER option. - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: file_fdw: Support multi-line HEADER option.
Date
Msg-id CAHGQGwGWyApGA0L-uE819xeinwSonPXQfV1diBUCkR+AcgxuOw@mail.gmail.com
Whole thread Raw
In response to Re: file_fdw: Support multi-line HEADER option.  (Shinya Kato <shinya11.kato@gmail.com>)
Responses Re: file_fdw: Support multi-line HEADER option.
List pgsql-hackers
On Tue, Jan 20, 2026 at 1:17 PM Shinya Kato <shinya11.kato@gmail.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

pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication
Next
From: Fujii Masao
Date:
Subject: Re: file_fdw: Support multi-line HEADER option.