Provide FORCE_NULL * and FORCE_NOT_NULL * options for COPY FROM
These options already exist, but you need to specify a column list for
them, which can be cumbersome. We already have the possibility of all
columns for FORCE QUOTE, so this is simply extending that facility to
FORCE_NULL and FORCE_NOT_NULL.
Author: Zhang Mingli
Reviewed-By: Richard Guo, Kyatoro Horiguchi, Michael Paquier.
Discussion: https://postgr.es/m/CACJufxEnVqzOFtqhexF2+AwOKFrV8zHOY3y=p+gPK6eB14pn_w@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f6d4c9cf162b70f2837fb6c2a83e80a3f3410695
Modified Files
--------------
doc/src/sgml/ref/copy.sgml | 6 +++--
src/backend/commands/copy.c | 12 ++++++----
src/backend/commands/copyfrom.c | 8 +++++--
src/backend/commands/copyto.c | 5 +----
src/backend/parser/gram.y | 8 +++++++
src/include/commands/copy.h | 2 ++
src/test/regress/expected/copy2.out | 44 +++++++++++++++++++++++++++++++++++++
src/test/regress/sql/copy2.sql | 30 +++++++++++++++++++++++++
8 files changed, 103 insertions(+), 12 deletions(-)