summaryrefslogtreecommitdiff
path: root/src/include/commands
diff options
context:
space:
mode:
authorFujii Masao2024-10-08 09:19:58 +0000
committerFujii Masao2024-10-08 09:19:58 +0000
commit4ac2a9beceb10d44806d2cf157d5a931bdade39e (patch)
tree129027bdf5e2ed13e83087631fb769ad30feee3f /src/include/commands
parentd759c1a0b864366d3592203c782027825ec4c8c8 (diff)
Add REJECT_LIMIT option to the COPY command.
Previously, when ON_ERROR was set to 'ignore', the COPY command would skip all rows with data type conversion errors, with no way to limit the number of skipped rows before failing. This commit introduces the REJECT_LIMIT option, allowing users to specify the maximum number of erroneous rows that can be skipped. If more rows encounter data type conversion errors than allowed by REJECT_LIMIT, the COPY command will fail with an error, even when ON_ERROR = 'ignore'. Author: Atsushi Torikoshi Reviewed-by: Junwang Zhao, Kirill Reshke, jian he, Fujii Masao Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/include/commands')
-rw-r--r--src/include/commands/copy.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/commands/copy.h b/src/include/commands/copy.h
index 6f64d97fdd9..4002a7f5382 100644
--- a/src/include/commands/copy.h
+++ b/src/include/commands/copy.h
@@ -85,6 +85,7 @@ typedef struct CopyFormatOptions
bool convert_selectively; /* do selective binary conversion? */
CopyOnErrorChoice on_error; /* what to do when error happened */
CopyLogVerbosityChoice log_verbosity; /* verbosity of logged messages */
+ int64 reject_limit; /* maximum tolerable number of errors */
List *convert_select; /* list of column names (can be NIL) */
} CopyFormatOptions;