Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
726725d4
Commit
726725d4
authored
Sep 18, 2009
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A bit more wordsmithing on the COPY CSV NULL business.
parent
1bd26353
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
doc/src/sgml/ref/copy.sgml
doc/src/sgml/ref/copy.sgml
+9
-10
No files found.
doc/src/sgml/ref/copy.sgml
View file @
726725d4
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.
89 2009/09/17 21:49:15 momjian
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.
90 2009/09/18 20:01:13 tgl
Exp $
PostgreSQL documentation
-->
...
...
@@ -183,8 +183,8 @@ COPY { <replaceable class="parameter">tablename</replaceable> [ ( <replaceable c
<listitem>
<para>
The string that represents a null value. The default is
<literal>\N</literal> (backslash-N) in text mode, and a empty
value with no quotes
in <literal>CSV</> mode. You might prefer an
<literal>\N</literal> (backslash-N) in text mode, and a
n unquoted
empty
string
in <literal>CSV</> mode. You might prefer an
empty string even in text mode for cases where you don't want to
distinguish nulls from empty strings.
</para>
...
...
@@ -249,8 +249,7 @@ COPY { <replaceable class="parameter">tablename</replaceable> [ ( <replaceable c
In <literal>CSV</> <command>COPY TO</> mode, forces quoting to be
used for all non-<literal>NULL</> values in each specified column.
<literal>NULL</> output is never quoted. If <literal>*</> is specified,
non-<literal>NULL</> values for all columns of the table will be
quoted.
non-<literal>NULL</> values will be quoted in all columns.
</para>
</listitem>
</varlistentry>
...
...
@@ -550,11 +549,11 @@ COPY <replaceable class="parameter">count</replaceable>
<para>
The <literal>CSV</> format has no standard way to distinguish a
<literal>NULL</> value from an empty string.
<productname>PostgreSQL</>'s <command>COPY</> handles this by
quoting. A <literal>NULL</> is output as the <literal>NULL</>
parameter and is not quoted, while a non-NULL
value matching the
the <literal>NULL</> parameter string is quoted. Therefore, using the default
settings, a <literal>NULL</> is written as an unquoted empty
<productname>PostgreSQL</>'s <command>COPY</> handles this by
quoting.
A <literal>NULL</> is output as the <literal>NULL</> parameter string
and is not quoted, while a non-<literal>NULL</>
value matching the
<literal>NULL</> parameter string is quoted. For example, with the
default
settings, a <literal>NULL</> is written as an unquoted empty
string, while an empty string data value is written with double quotes
(<literal>""</>). Reading values follows similar rules. You can
use <literal>FORCE NOT NULL</> to prevent <literal>NULL</> input
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment