Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Old] Errors handling during COPY FROM #1

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contrib/file_fdw/file_fdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ fileIterateForeignScan(ForeignScanState *node)
{
FileFdwExecutionState *festate = (FileFdwExecutionState *) node->fdw_state;
TupleTableSlot *slot = node->ss.ss_ScanTupleSlot;
bool found;
int found;
ErrorContextCallback errcallback;

/* Set up callback to identify error line number. */
Expand Down Expand Up @@ -1080,7 +1080,7 @@ file_acquire_sample_rows(Relation onerel, int elevel,
TupleDesc tupDesc;
Datum *values;
bool *nulls;
bool found;
int found;
char *filename;
bool is_program;
List *options;
Expand Down
12 changes: 12 additions & 0 deletions doc/src/sgml/ref/copy.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
FORCE_NOT_NULL ( <replaceable class="parameter">column_name</replaceable> [, ...] )
FORCE_NULL ( <replaceable class="parameter">column_name</replaceable> [, ...] )
ENCODING '<replaceable class="parameter">encoding_name</replaceable>'
IGNORE_ERRORS [ <replaceable class="parameter">boolean</replaceable> ]
</synopsis>
</refsynopsisdiv>

Expand Down Expand Up @@ -248,6 +249,17 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
</listitem>
</varlistentry>

<varlistentry>
<term><literal>IGNORE_ERRORS</literal></term>
<listitem>
<para>
Specifies ignoring errors in the input data. If TRUE, then all
errors due to the extra or missing columns and inappropriate type
format will be ignored with WARNING.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><literal>NULL</literal></term>
<listitem>
Expand Down
Loading