Re: [PATCH] Add error hints for invalid COPY options - Mailing list pgsql-hackers

From Kirill Reshke
Subject Re: [PATCH] Add error hints for invalid COPY options
Date
Msg-id CALdSSPgy8P3AgZyQ+TEp9ErpyXtu-rp2rg3JFQcTeKOCXGr+ZA@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add error hints for invalid COPY options  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
On Thu, 4 Dec 2025 at 03:56, Masahiko Sawada <sawada.mshk@gmail.com> wrote:

> The proposed patch requires us to create one function per option. I'm
> concerned that it could cause bloating functions and be overkill just
> to save changing a separate list. I would suggest starting with
> putting a validation check for options at the top of foreach() loop.
> When adding a new COPY option in the future, it wouldn't work if we
> miss either changing the valid-options list or handling the option,
> which seems a good prevention.
>

Yep, Im +1 on that.  "bloating functions" - that's precise wording, I
did not know how to explain the same concern.


-- 
Best regards,
Kirill Reshke



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Re: Extended Statistics set/restore/clear functions.
Next
From: Michael Paquier
Date:
Subject: Re: Improve error reporting in 027_stream_regress test