|
1 | 1 | <!-- |
2 | | -$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.51 2003/09/22 00:16:57 petere Exp $ |
| 2 | +$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.52 2003/09/30 01:56:11 tgl Exp $ |
3 | 3 | PostgreSQL documentation |
4 | 4 | --> |
5 | 5 |
|
@@ -77,7 +77,7 @@ COPY <replaceable class="parameter">tablename</replaceable> [ ( <replaceable cla |
77 | 77 | <term><replaceable class="parameter">tablename</replaceable></term> |
78 | 78 | <listitem> |
79 | 79 | <para> |
80 | | - The name (possibly schema-qualified) of an existing table. |
| 80 | + The name (optionally schema-qualified) of an existing table. |
81 | 81 | </para> |
82 | 82 | </listitem> |
83 | 83 | </varlistentry> |
@@ -355,10 +355,16 @@ COPY <replaceable class="parameter">tablename</replaceable> [ ( <replaceable cla |
355 | 355 |
|
356 | 356 | <para> |
357 | 357 | <command>COPY TO</command> will terminate each row with a Unix-style |
358 | | - newline (<quote><literal>\n</></>), or carriage return/newline |
359 | | - ("\r\n") for servers running MS Windows. |
| 358 | + newline (<quote><literal>\n</></>). Servers running on MS Windows instead |
| 359 | + output carriage return/newline (<quote><literal>\r\n</></>), but only for |
| 360 | + <command>COPY</> to a server file; for consistency across platforms, |
| 361 | + <command>COPY TO STDOUT</> always sends <quote><literal>\n</></> |
| 362 | + regardless of server platform. |
360 | 363 | <command>COPY FROM</command> can handle lines ending with newlines, |
361 | | - carriage returns, or carriage return/newlines. |
| 364 | + carriage returns, or carriage return/newlines. To reduce the risk of |
| 365 | + error due to un-backslashed newlines or carriage returns that were |
| 366 | + meant as data, <command>COPY FROM</command> will complain if the line |
| 367 | + endings in the input are not all alike. |
362 | 368 | </para> |
363 | 369 | </refsect2> |
364 | 370 |
|
@@ -476,9 +482,9 @@ to be specified. |
476 | 482 | To determine the appropriate binary format for the actual tuple data you |
477 | 483 | should consult the <productname>PostgreSQL</productname> source, in |
478 | 484 | particular the <function>*send</> and <function>*recv</> functions for |
479 | | -the data type (typically found in the <filename>src/backend/utils/adt</filename> |
480 | | -directory). The <application>contrib/binarycopy</application> module |
481 | | -can also be used to create an appropriate format file. |
| 485 | +each column's data type (typically these functions are found in the |
| 486 | +<filename>src/backend/utils/adt/</filename> directory of the source |
| 487 | +distribution). |
482 | 488 | </para> |
483 | 489 |
|
484 | 490 | <para> |
|
0 commit comments