Add new COPY option LOG_VERBOSITY.
authorMasahiko Sawada <msawada@postgresql.org>
Mon, 1 Apr 2024 06:25:25 +0000 (15:25 +0900)
committerMasahiko Sawada <msawada@postgresql.org>
Mon, 1 Apr 2024 06:25:25 +0000 (15:25 +0900)
commitf5a227895e178bf528b18f82bbe554435fb3e64f
treec93d52125f449f8f37382ca933af617182cb9130
parentf4ad0021aface01ee74604355bd2e998e5f73320
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
doc/src/sgml/ref/copy.sgml
src/backend/commands/copy.c
src/backend/commands/copyfrom.c
src/backend/commands/copyfromparse.c
src/backend/parser/gram.y
src/bin/psql/tab-complete.c
src/include/commands/copy.h
src/test/regress/expected/copy2.out
src/test/regress/sql/copy2.sql
src/tools/pgindent/typedefs.list