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

Zhang Mingli <zmlpostgres@gmail.com>

From: Zhang Mingli <zmlpostgres@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: guofenglinux@gmail.com, pgsql-hackers@postgresql.org
Date: 2022-08-02T08:13:30Z
Lists: pgsql-hackers

Attachments

Regards,
Zhang Mingli
On Aug 2, 2022, 12:30 +0800, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, wrote:
> An empty List is not NULL but NIL (which values are identical,
> though).
Thanks for pointing that out. Fix it in new patch.
> There are some other option combinations that are rejected
> by ProcessCopyOptions. On the other hand *re*checking all
> combinations that the function should have rejected is kind of silly.
> Addition to that, I doubt the assertions are really needed even though
> the wrong values don't lead to any serious consequence.
>
Agree.
ProcessCopyOptions has rejected all invalid combinations and assertions are optional.
> regards.
>
> --
> Kyotaro Horiguchi
> NTT Open Source Software Center

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.