pgsql: file_fdw: Add REJECT_LIMIT option to file_fdw. - Mailing list pgsql-committers

From Fujii Masao
Subject pgsql: file_fdw: Add REJECT_LIMIT option to file_fdw.
Date
Msg-id E1tDm6V-002jPS-VZ@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
file_fdw: Add REJECT_LIMIT option to file_fdw.

Commit 4ac2a9bece introduced the REJECT_LIMIT option for the COPY
command. This commit extends the support for this option to file_fdw.

As well as REJECT_LIMIT option for COPY, this option limits
the maximum number of erroneous rows that can be skipped.
If the number of data type conversion errors exceeds this limit,
accessing the file_fdw foreign table will fail with an error,
even when on_error = 'ignore' is specified.

Since the CREATE/ALTER FOREIGN TABLE commands require foreign
table options to be single-quoted, this commit updates
defGetCopyRejectLimitOption() to handle also string value for them,
in addition to int64 value for COPY command option.

Author: Atsushi Torikoshi
Reviewed-by: Fujii Masao, Yugo Nagata, Kirill Reshke
Discussion: https://postgr.es/m/bab68a9fc502b12693f0755b6f35f327@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6c8f670323d22acb62104f7f8f1b1a078dadd255

Modified Files
--------------
contrib/file_fdw/data/agg.bad          |  1 +
contrib/file_fdw/expected/file_fdw.out | 18 ++++++++++++++++--
contrib/file_fdw/file_fdw.c            |  8 ++++++++
contrib/file_fdw/sql/file_fdw.sql      |  7 ++++++-
doc/src/sgml/file-fdw.sgml             | 12 ++++++++++++
src/backend/commands/copy.c            | 16 +++++++++++++++-
6 files changed, 58 insertions(+), 4 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: doc: Fix section of functions age(xid) and mxid_age(xid)
Next
From: Tom Lane
Date:
Subject: pgsql: Avoid assertion failure if a setop leaf query contains setops.