pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add new COPY option LOG_VERBOSITY.
Date: Mon, 01 Apr 2024 06:25:49 +0000
Message-ID: <E1rrB77-006npx-1p@gemulon.postgresql.org> (raw)

Add new COPY option LOG_VERBOSITY.

This commit adds a new COPY option LOG_VERBOSITY, which controls the
amount of messages emitted during processing. Valid values are
'default' and 'verbose'.

This is currently used in COPY FROM when ON_ERROR option is set to
ignore. If 'verbose' is specified, a NOTICE message is emitted for
each discarded row, providing additional information such as line
number, column name, and the malformed value. This helps users to
identify problematic rows that failed to load.

Author: Bharath Rupireddy
Reviewed-by: Michael Paquier, Atsushi Torikoshi, Masahiko Sawada
Discussion: https://www.postgresql.org/message-id/CALj2ACUk700cYhx1ATRQyRw-fBM%2BaRo6auRAitKGff7XNmYfqQ%40mail.g...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f5a227895e178bf528b18f82bbe554435fb3e64f

Modified Files
--------------
doc/src/sgml/ref/copy.sgml           | 25 ++++++++++++++++++++--
src/backend/commands/copy.c          | 32 ++++++++++++++++++++++++++++
src/backend/commands/copyfrom.c      | 10 ++++-----
src/backend/commands/copyfromparse.c | 35 ++++++++++++++++++++++++++++++
src/backend/parser/gram.y            |  1 +
src/bin/psql/tab-complete.c          |  6 +++++-
src/include/commands/copy.h          | 11 ++++++++++
src/test/regress/expected/copy2.out  | 41 +++++++++++++++++++++++++++++++++++-
src/test/regress/sql/copy2.sql       | 24 ++++++++++++++++++++-
src/tools/pgindent/typedefs.list     |  1 +
10 files changed, 175 insertions(+), 11 deletions(-)



Message-ID: <E1rrB77-006npx-1p@gemulon.postgresql.org>
Permalink:  ../E1rrB77-006npx-1p@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rrB77-006npx-1p@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: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add new COPY option LOG_VERBOSITY.
  In-Reply-To: <E1rrB77-006npx-1p@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