Обсуждение: pgsql: Add new COPY option LOG_VERBOSITY.

Поиск
Список
Период
Сортировка

pgsql: Add new COPY option LOG_VERBOSITY.

От
Masahiko Sawada
Дата:
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(-)