pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Provide FORCE_NULL * and FORCE_NOT_NULL * options for COPY FROM
Date: Sat, 30 Sep 2023 16:44:16 +0000
Message-ID: <E1qmd4i-006pHm-DG@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1qmd4i-006pHm-DG@gemulon.postgresql.org>
Permalink:  ../E1qmd4i-006pHm-DG@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qmd4i-006pHm-DG@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andrew@dunslane.net, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Provide FORCE_NULL * and FORCE_NOT_NULL * options for COPY FROM
  In-Reply-To: <E1qmd4i-006pHm-DG@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox