Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit726725d

Browse files
committed
A bit more wordsmithing on the COPY CSV NULL business.
1 parent1bd2635 commit726725d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

‎doc/src/sgml/ref/copy.sgml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.89 2009/09/17 21:49:15 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.90 2009/09/18 20:01:13 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -183,8 +183,8 @@ COPY { <replaceable class="parameter">tablename</replaceable> [ ( <replaceable c
183183
<listitem>
184184
<para>
185185
The string that represents a null value. The default is
186-
<literal>\N</literal> (backslash-N) in text mode, anda empty
187-
value with no quotes in <literal>CSV</> mode. You might prefer an
186+
<literal>\N</literal> (backslash-N) in text mode, andan unquoted empty
187+
string in <literal>CSV</> mode. You might prefer an
188188
empty string even in text mode for cases where you don't want to
189189
distinguish nulls from empty strings.
190190
</para>
@@ -249,8 +249,7 @@ COPY { <replaceable class="parameter">tablename</replaceable> [ ( <replaceable c
249249
In <literal>CSV</> <command>COPY TO</> mode, forces quoting to be
250250
used for all non-<literal>NULL</> values in each specified column.
251251
<literal>NULL</> output is never quoted. If <literal>*</> is specified,
252-
non-<literal>NULL</> values for all columns of the table will be
253-
quoted.
252+
non-<literal>NULL</> values will be quoted in all columns.
254253
</para>
255254
</listitem>
256255
</varlistentry>
@@ -550,11 +549,11 @@ COPY <replaceable class="parameter">count</replaceable>
550549
<para>
551550
The <literal>CSV</> format has no standard way to distinguish a
552551
<literal>NULL</> value from an empty string.
553-
<productname>PostgreSQL</>'s <command>COPY</> handles this by
554-
quoting.A <literal>NULL</> is output as the <literal>NULL</>
555-
parameterand is not quoted, while a non-NULL value matching the
556-
the<literal>NULL</> parameter string is quoted.Therefore, using the default
557-
settings, a <literal>NULL</> is written as an unquoted empty
552+
<productname>PostgreSQL</>'s <command>COPY</> handles this by quoting.
553+
A <literal>NULL</> is output as the <literal>NULL</> parameter string
554+
and is not quoted, while a non-<literal>NULL</> value matching the
555+
<literal>NULL</> parameter string is quoted. For example, with the
556+
defaultsettings, a <literal>NULL</> is written as an unquoted empty
558557
string, while an empty string data value is written with double quotes
559558
(<literal>""</>). Reading values follows similar rules. You can
560559
use <literal>FORCE NOT NULL</> to prevent <literal>NULL</> input

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp