> I would agree that this is a bug because we are failing to detect > what's actually a redundant option here as the first option still > causes the flag to be set to false, but that's not something worth a > back-patch IMO. What we are looking here is something similar > to what is done with "format", where we track if the option has been > specified with format_specified. The same is actually true with the > "freeze" option here, and it is true that we tend to prefer error-ing > in such cases while there are exceptions like EXPLAIN. I think that > it would be nicer to be at least consistent with the behavior that > each command has chosen, and COPY is now a mixed bag.
Here’s a new version of the patches that report an error when the options are set multiple time. Regards, Rémi
v5-0001-Add-header-support-to-COPY-TO-text-format.patch
Description: Binary data
v5-0002-Add-header-matching-mode-to-COPY-FROM.patch
Description: Binary data
v5-0003-Report-an-error-when-options-are-set-multiple-tim.patch
Description: Binary data