Re: [Refactor]Avoid to handle FORCE_NOT_NULL/FORCE_NULL options when COPY TO - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: [Refactor]Avoid to handle FORCE_NOT_NULL/FORCE_NULL options when COPY TO
Date
Msg-id 20220802.133050.1983300389899830471.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: [Refactor]Avoid to handle FORCE_NOT_NULL/FORCE_NULL options when COPY TO  (Zhang Mingli <zmlpostgres@gmail.com>)
Responses Re: [Refactor]Avoid to handle FORCE_NOT_NULL/FORCE_NULL options when COPY TO
List 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



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: COPY TO (FREEZE)?
Next
From: Japin Li
Date:
Subject: Re: Typo in pg_db_role_setting.h