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

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: [Refactor]Avoid to handle FORCE_NOT_NULL/FORCE_NULL options when COPY TO
Дата
Msg-id 20220727.135549.2220493665538361475.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на [Refactor]Avoid to handle FORCE_NOT_NULL/FORCE_NULL options when COPY TO  (Zhang Mingli <zmlpostgres@gmail.com>)
Ответы Re: [Refactor]Avoid to handle FORCE_NOT_NULL/FORCE_NULL options when COPY TO  (Richard Guo <guofenglinux@gmail.com>)
Список pgsql-hackers
At Wed, 27 Jul 2022 00:16:33 +0800, Zhang Mingli <zmlpostgres@gmail.com> wrote in 
> FORCE_NOT_NULL and FORCE_NULL are only used when COPY FROM.
> 
> And copyto.c and copyfrom.c are split in this commit
https://github.com/postgres/postgres//commit/c532d15dddff14b01fe9ef1d465013cb8ef186df
<https://github.com/postgres/postgres//commit/c532d15dddff14b01fe9ef1d465013cb8ef186df>.
 
> 
> There is no need to handle these options when COPY TO.

Agreed.

ProcessCopyOptions previously rejects force_quote_all for COPY FROM
and copyfrom.c is not even conscious of the option (that is, even no
assertion on it). The two options are rejected for COPY TO by the same
function so it seems like a thinko of the commit. Getting rid of the
code would be good in the view of code coverage and maintenance.

On the otherhand I wonder if it is good that we have assertions on the
option values.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Perform streaming logical transactions by background workers and parallel apply
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: predefined role(s) for VACUUM and ANALYZE