pgsql: Add new COPY option LOG_VERBOSITY.

From: Masahiko Sawada <msawada(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add new COPY option LOG_VERBOSITY.
Date: 2024-04-01 06:25:49
Message-ID: E1rrB77-006npx-1p@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2024-04-01 09:21:16 pgsql: Minor refactoring in heap_page_prune
Previous Message John Naylor 2024-03-31 07:20:55 pgsql: Revert "Speed up tail processing when hashing aligned C strings"