Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f7d9aa8

Browse files
committed
The attached patch adds some clarification to the documentation of the
binary format read/created by COPY BINARY. It also mentions the contrib/binarycopy module. Lee Kindness.
1 parent 6499ebb commit f7d9aa8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

doc/src/sgml/ref/copy.sgml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.46 2003/05/09 21:19:48 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.47 2003/08/17 04:33:02 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -380,7 +380,7 @@ COPY <replaceable class="parameter">table</replaceable> [ ( <replaceable class="
380380
The file format used for <command>COPY BINARY</command> changed in
381381
<application>PostgreSQL</application> 7.4. The new format consists
382382
of a file header, zero or more tuples containing the row data, and
383-
a file trailer.
383+
a file trailer. Headers and data are now in network byte order.
384384
</para>
385385

386386
<refsect3>
@@ -483,6 +483,15 @@ future extension may add a header field that allows per-column format codes
483483
to be specified.
484484
</para>
485485

486+
<para>
487+
To determine the appropriate binary format for the actual tuple data you
488+
should consult the <application>PostgreSQL</application> source, in
489+
particular the <function>*send</> and <function>*recv</> functions for
490+
the data type (typically found in the <filename>src/backend/utils/adt</filename>
491+
directory). The <application>contrib/binarycopy</application> module
492+
can also be used to create an appropriate format file.
493+
</para>
494+
486495
<para>
487496
If OIDs are included in the file, the OID field immediately follows the
488497
field-count word. It is a normal field except that it's not included

0 commit comments

Comments
 (0)