Re: [Refactor]Avoid to handle FORCE_NOT_NULL/FORCE_NULL options when COPY TO

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Zhang Mingli <zmlpostgres@gmail.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, pgsql-hackers@postgresql.org
Date: 2022-11-02T01:15:37Z
Lists: pgsql-hackers
On Tue, Nov 01, 2022 at 05:51:42PM +0800, Richard Guo wrote:
> I'm OK with not having these assertions.  I have to admit they look
> somewhat redundant here, after what ProcessCopyOptions has done.

Thanks, and done.

While on it, I have noticed some gaps with the coverage of the code,
where we did not check that FORCE_NULL & co are not allowed in some
cases.  With two tests for BINARY, that made a total of 8 patterns,
applied as of 451d116.
--
Michael

Commits

  1. Remove code handling FORCE_NULL and FORCE_NOT_NULL for COPY TO

  2. Add more tests for COPY with incorrect option combinations

  3. Split copy.c into four files.