summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2009-09-17 21:49:15 +0000
committerBruce Momjian <bruce@momjian.us>2009-09-17 21:49:15 +0000
commitef9619609a2d616adc0f047c0ed559945422ec9d (patch)
treea9a980a19dbd8ec59125c37fef74c027f89fd8e3
parent87f4a26e5d592bdeeb877c1acf108e5ecdf7c9bc (diff)
downloadpostgresql-ef9619609a2d616adc0f047c0ed559945422ec9d.tar.gz
CSV NULL Documentation
Update docs to clearly explain NULL value matching behavior, per Andrew. Backpatch to 8.4.X.
-rw-r--r--doc/src/sgml/ref/copy.sgml13
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml
index ff91ee2d9f..79ed7c204e 100644
--- a/doc/src/sgml/ref/copy.sgml
+++ b/doc/src/sgml/ref/copy.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.88 2009/09/17 21:13:01 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.89 2009/09/17 21:49:15 momjian Exp $
PostgreSQL documentation
-->
@@ -550,10 +550,13 @@ 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 using
- quoting. A <literal>NULL</> is output as an empty string without
- quotes, while an empty string data value is double-quoted
- (<literal>""</>). Reading values follows similar rules. You can
+ <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
+ 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
comparisons for specific columns.
</para>