diff options
author | Bruce Momjian <bruce@momjian.us> | 2009-09-17 21:49:22 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2009-09-17 21:49:22 +0000 |
commit | 541569caed0955bd3c6bb09d9a1d23e3d1e28da6 (patch) | |
tree | 460258ffd4ca05a962f0c26b2eadd465ed1191ae /doc/src | |
parent | 77b2388b2417d80505db67a81f773cf80e2d9529 (diff) |
CSV NULL Documentation
Update docs to clearly explain NULL value matching behavior, per Andrew.
Backpatch to 8.4.X.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/copy.sgml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 238397828fe..23a3ef0b9b6 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.85.2.1 2009/09/17 21:28:30 momjian Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.85.2.2 2009/09/17 21:49:22 momjian Exp $ PostgreSQL documentation --> @@ -544,10 +544,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> |