diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/copy.sgml | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 3653ae9ef60..adbaa4c8e91 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.10 1999/10/29 23:52:20 momjian Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.11 1999/12/14 00:08:12 momjian Exp $ Postgres documentation --> @@ -20,15 +20,17 @@ Postgres documentation </refnamediv> <refsynopsisdiv> <refsynopsisdivinfo> - <date>1999-07-20</date> + <date>1999-12-11</date> </refsynopsisdivinfo> <synopsis> COPY [ BINARY ] <replaceable class="parameter">table</replaceable> [ WITH OIDS ] FROM { '<replaceable class="parameter">filename</replaceable>' | <filename>stdin</filename> } [ [USING] DELIMITERS '<replaceable class="parameter">delimiter</replaceable>' ] + [ WITH NULL AS '<replaceable class="parameter">null string</replaceable>' ] COPY [ BINARY ] <replaceable class="parameter">table</replaceable> [ WITH OIDS ] TO { '<replaceable class="parameter">filename</replaceable>' | <filename>stdout</filename> } [ [USING] DELIMITERS '<replaceable class="parameter">delimiter</replaceable>' ] + [ WITH NULL AS '<replaceable class="parameter">null string</replaceable>' ] </synopsis> <refsect2 id="R2-SQL-COPY-1"> @@ -104,6 +106,25 @@ COPY [ BINARY ] <replaceable class="parameter">table</replaceable> [ WITH OIDS ] </para> </listitem> </varlistentry> + + <varlistentry> + <term><replaceable class="parameter">null print</replaceable></term> + <listitem> + <para> + A string to represent NULL values. The default is + <quote><literal>\N</literal></quote> (backslash-N), for historical + reasons. You might prefer an empty string, for example. + </para> + <note> + <para> + On a copy in, any data item that matches this string will be stored as + a NULL value, so you should make sure that you use the same string + as you used on copy out. + </para> + </hote> + </listitem> + </varlistentry> + </variablelist> </para> </refsect2> @@ -287,15 +308,16 @@ ERROR: <replaceable>reason</replaceable> encountered before this special end-of-file pattern is found. </para> <para> - The backslash character has other special meanings. NULL attributes are - represented as "\N". A literal backslash character is represented as two + The backslash character has other special meanings. A literal backslash + character is represented as two consecutive backslashes ("\\"). A literal tab character is represented as a backslash and a tab. A literal newline character is represented as a backslash and a newline. When loading text data not generated by <acronym>Postgres</acronym>, you will need to convert backslash characters ("\") to double-backslashes ("\\") to ensure that they are loaded - properly. + properly. (The sequence "\N" will always be interpreted as a backslash and + an "N", for compatibility. The more general solution is "\\N".) </para> </refsect2> |