1
1
<!--
2
- $Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.35 2002/08/02 18:15:04 tgl Exp $
2
+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.36 2002/08/04 05:09:36 momjian Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -57,7 +57,7 @@ COPY <replaceable class="parameter">table</replaceable> [ ( <replaceable class="
57
57
</varlistentry>
58
58
59
59
<varlistentry>
60
- <term><replaceable class="parameter">column list </replaceable></term>
60
+ <term><replaceable class="parameter">column</replaceable></term>
61
61
<listitem>
62
62
<para>
63
63
An optional list of columns to be copied. If no column list is
@@ -99,7 +99,8 @@ COPY <replaceable class="parameter">table</replaceable> [ ( <replaceable class="
99
99
<para>
100
100
Changes the behavior of field formatting, forcing all data to be
101
101
stored or read in binary format rather than as text. You can not
102
- specify DELIMITER or NULL in binary mode.
102
+ specify <option>DELIMITER</option>, <option>NULL</option>, or
103
+ a column list in binary mode.
103
104
</para>
104
105
</listitem>
105
106
</varlistentry>
@@ -117,7 +118,7 @@ COPY <replaceable class="parameter">table</replaceable> [ ( <replaceable class="
117
118
<term><replaceable class="parameter">delimiter</replaceable></term>
118
119
<listitem>
119
120
<para>
120
- The character that separates fields within each row (line) of the file.
121
+ Thesingle character that separates fields within each row (line) of the file.
121
122
</para>
122
123
</listitem>
123
124
</varlistentry>
@@ -189,9 +190,7 @@ ERROR: <replaceable>reason</replaceable>
189
190
<para>
190
191
<command>COPY</command> moves data between
191
192
<productname>PostgreSQL</productname> tables and standard file-system
192
- files.
193
-
194
- <command>COPY TO</command> copies the entire contents of a table
193
+ files. <command>COPY TO</command> copies the contents of a table
195
194
<emphasis>to</> a file, while <command>COPY FROM</command> copies
196
195
data <emphasis>from</> a file to a table (appending the data to
197
196
whatever is in the table already).
@@ -200,7 +199,7 @@ ERROR: <replaceable>reason</replaceable>
200
199
<para>
201
200
If a list of columns is specified, <command>COPY</command> will
202
201
only copy the data in the specified columns to or from the file.
203
- If there are any columns in the table that are not in thefile ,
202
+ If there are any columns in the table that are not in thecolumn list ,
204
203
<command>COPY FROM</command> will insert the default values for
205
204
those columns.
206
205
</para>
@@ -249,8 +248,8 @@ ERROR: <replaceable>reason</replaceable>
249
248
<para>
250
249
By default, a text copy uses a tab ("\t") character as a delimiter
251
250
between fields. The field delimiter may be changed to any other
252
- single character with the keyword DELIMITER. Characters in data
253
- fields that happen to match the delimiter character will be
251
+ single character with the keyword<option> DELIMITER</option> . Characters
252
+ in data fields that happen to match the delimiter character will be
254
253
backslash quoted.
255
254
</para>
256
255
@@ -635,15 +634,14 @@ OIDs to be shown as NULL if that ever proves desirable.
635
634
Usage
636
635
</title>
637
636
<para>
638
- The following example copies a table to standard output,
639
- using a vertical bar (|) as the field
640
- delimiter:
637
+ The following example copies a table to standard output,
638
+ using a vertical bar (|) as the field delimiter:
641
639
</para>
642
640
<programlisting>
643
641
COPY country TO <filename>stdout</filename> WITH DELIMITER '|';
644
642
</programlisting>
645
643
<para>
646
- To copy data from a Unix file intoa table country:
644
+ To copy data from a Unix file intothe <literal> country</> table :
647
645
</para>
648
646
<programlisting>
649
647
COPY country FROM '/usr1/proj/bray/sql/country_data';