Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
jian he <jian.universality@gmail.com>
From: jian he <jian.universality@gmail.com>
To: torikoshia <torikoshia@oss.nttdata.com>
Cc: Alexander Korotkov <aekorotkov@gmail.com>,
Masahiko Sawada <sawada.mshk@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
vignesh21@gmail.com, lena.ribackina@yandex.ru, dam.bel07@gmail.com, zhihuifan1213@163.com, daniel@yesql.se, pgsql-hackers@postgresql.org, andres@anarazel.de, anisimow.d@gmail.com, HukuToc@gmail.com, pgsql-hackers@lists.postgresql.org, a.lepikhov@postgrespro.ru
Date: 2024-01-18T14:59:44Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
doc: Fix COPY ON_ERROR option syntax synopsis.
- f6f8ac8e75c9 17.0 landed
-
Disallow specifying ON_ERROR option without value.
- a6d0fa5ef840 17.0 landed
-
Rename COPY option from SAVE_ERROR_TO to ON_ERROR
- b725b7eec431 17.0 landed
-
Fix spelling in notice
- 58fbbc9d683c 17.0 landed
-
Add new COPY option SAVE_ERROR_TO
- 9e2d8701194f 17.0 landed
Attachments
- copy_on_error.diff (text/x-patch) patch
Hi.
patch refactored based on "on_error {stop|ignore}"
doc changes:
--- a/doc/src/sgml/ref/copy.sgml
+++ b/doc/src/sgml/ref/copy.sgml
@@ -43,7 +43,7 @@ COPY { <replaceable
class="parameter">table_name</replaceable> [ ( <replaceable
FORCE_QUOTE { ( <replaceable
class="parameter">column_name</replaceable> [, ...] ) | * }
FORCE_NOT_NULL { ( <replaceable
class="parameter">column_name</replaceable> [, ...] ) | * }
FORCE_NULL { ( <replaceable
class="parameter">column_name</replaceable> [, ...] ) | * }
- SAVE_ERROR_TO '<replaceable class="parameter">location</replaceable>'
+ ON_ERROR '<replaceable class="parameter">error_action</replaceable>'
ENCODING '<replaceable class="parameter">encoding_name</replaceable>'
</synopsis>
</refsynopsisdiv>
@@ -375,20 +375,20 @@ COPY { <replaceable
class="parameter">table_name</replaceable> [ ( <replaceable
</varlistentry>
<varlistentry>
- <term><literal>SAVE_ERROR_TO</literal></term>
+ <term><literal>ON_ERROR</literal></term>
<listitem>
<para>
- Specifies to save error information to <replaceable class="parameter">
- location</replaceable> when there is malformed data in the input.
- Currently, only <literal>error</literal> (default) and
<literal>none</literal>
+ Specifies which <replaceable class="parameter">
+ error_action</replaceable> to perform when there is malformed
data in the input.
+ Currently, only <literal>stop</literal> (default) and
<literal>ignore</literal>
values are supported.
- If the <literal>error</literal> value is specified,
+ If the <literal>stop</literal> value is specified,
<command>COPY</command> stops operation at the first error.
- If the <literal>none</literal> value is specified,
+ If the <literal>ignore</literal> value is specified,
<command>COPY</command> skips malformed data and continues copying data.
The option is allowed only in <command>COPY FROM</command>.
- The <literal>none</literal> value is allowed only when
- not using <literal>binary</literal> format.
+ Only <literal>stop</literal> value is allowed only when
+ using <literal>binary</literal> format.
</para>