Re: [Refactor]Avoid to handle FORCE_NOT_NULL/FORCE_NULL options when COPY TO
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: zmlpostgres@gmail.com
Cc: guofenglinux@gmail.com, pgsql-hackers@postgresql.org
Date: 2022-08-02T04:30:50Z
Lists: pgsql-hackers
At Mon, 1 Aug 2022 09:59:49 +0800, Zhang Mingli <zmlpostgres@gmail.com> wrote in > On Jul 29, 2022, 11:24 +0800, Richard Guo <guofenglinux@gmail.com>, wrote: > > > > > On Thu, Jul 28, 2022 at 9:04 PM Zhang Mingli <zmlpostgres@gmail.com> wrote: > > > > Assertions added. > > > > > > Can we also add assertions to make sure force_quote, force_notnull and > > > force_null are available only in CSV mode? > > More assertions added. An empty List is not NULL but NIL (which values are identical, though). 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. regards. -- Kyotaro Horiguchi NTT Open Source Software Center
Commits
-
Remove code handling FORCE_NULL and FORCE_NOT_NULL for COPY TO
- 8e621c10c73a 16.0 landed
-
Add more tests for COPY with incorrect option combinations
- 451d1164b9d0 16.0 landed
-
Split copy.c into four files.
- c532d15dddff 14.0 cited