pgsql: Add new COPY option LOG_VERBOSITY. - Mailing list pgsql-committers

From Masahiko Sawada
Subject pgsql: Add new COPY option LOG_VERBOSITY.
Date
Msg-id E1rrB77-006npx-1p@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.gmail.com

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


pgsql-committers by date:

Previous
From: John Naylor
Date:
Subject: pgsql: Revert "Speed up tail processing when hashing aligned C strings"
Next
From: Heikki Linnakangas
Date:
Subject: [MASSMAIL]pgsql: Minor refactoring in heap_page_prune