mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
Here is a /doc patch for the oid preservation code.
Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
This commit is contained in:
parent
ab76bbf8fd
commit
9fb31dcb54
@ -1,14 +1,14 @@
|
|||||||
.\" This is -*-nroff-*-
|
.\" This is -*-nroff-*-
|
||||||
.\" XXX standard disclaimer belongs here....
|
.\" XXX standard disclaimer belongs here....
|
||||||
.\" $Header: /cvsroot/pgsql/doc/man/Attic/copy.l,v 1.2 1996/09/19 20:08:09 scrappy Exp $
|
.\" $Header: /cvsroot/pgsql/doc/man/Attic/copy.l,v 1.3 1996/09/19 20:09:01 scrappy Exp $
|
||||||
.TH COPY SQL 11/05/95 Postgres95 Postgres95
|
.TH COPY SQL 11/05/95 Postgres95 Postgres95
|
||||||
.SH NAME
|
.SH NAME
|
||||||
copy \(em copy data to or from a class from or to a Unix file.
|
copy \(em copy data to or from a class from or to a Unix file.
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
\fBcopy\fP [\fBbinary\fP] classname
|
\fBcopy\fP [\fBbinary\fP] classname [\fBwith oids\fP]
|
||||||
\fBto\fP|\fBfrom\fP "filename"|\fBstdin\fR|\fBstdout\fR
|
\fBto\fP|\fBfrom\fP "filename"|\fBstdin\fR|\fBstdout\fR
|
||||||
[\fBUSING DELIMITERS\fP delim]
|
[\fBusing delimiters\fP delim]
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.BR Copy
|
.BR Copy
|
||||||
@ -18,6 +18,11 @@ keyword
|
|||||||
changes the behavior of field formatting, as described below.
|
changes the behavior of field formatting, as described below.
|
||||||
.IR Classname
|
.IR Classname
|
||||||
is the name of an existing class.
|
is the name of an existing class.
|
||||||
|
The keyword
|
||||||
|
.BR "with oids"
|
||||||
|
copies the internal unique object id (OID) for each row.
|
||||||
|
.IR Classname
|
||||||
|
is the name of an existing class.
|
||||||
.IR Filename
|
.IR Filename
|
||||||
is the Unix pathname of the file. In place of a filename, the
|
is the Unix pathname of the file. In place of a filename, the
|
||||||
keywords
|
keywords
|
||||||
@ -26,7 +31,9 @@ can be used so that input to
|
|||||||
.BR copy
|
.BR copy
|
||||||
can be written by a Libpq application and output from the
|
can be written by a Libpq application and output from the
|
||||||
.BR copy
|
.BR copy
|
||||||
command can be read by a Libpq application. The
|
command can be read by a Libpq application.
|
||||||
|
.PP
|
||||||
|
The
|
||||||
.BR binary
|
.BR binary
|
||||||
keyword will force all data to be stored/read as binary objects rather
|
keyword will force all data to be stored/read as binary objects rather
|
||||||
than as ASCII text. It is somewhat faster than the normal
|
than as ASCII text. It is somewhat faster than the normal
|
||||||
@ -34,12 +41,15 @@ than as ASCII text. It is somewhat faster than the normal
|
|||||||
command, but is not generally portable, and the files generated are
|
command, but is not generally portable, and the files generated are
|
||||||
somewhat larger, although this factor is highly dependent on the data
|
somewhat larger, although this factor is highly dependent on the data
|
||||||
itself.
|
itself.
|
||||||
.PP
|
When copying in, the
|
||||||
By default,
|
.BR "with oids"
|
||||||
|
keyword should only be used on an empty database because
|
||||||
|
the loaded oids could conflict with existing oids.
|
||||||
|
By default, a ASCII
|
||||||
.BR copy
|
.BR copy
|
||||||
uses a tab (\\t) character as a delimiter. The delimiter may also be changed
|
uses a tab (\\t) character as a delimiter. The delimiter may also be changed
|
||||||
to any other single-character with the use of
|
to any other single-character with the use of
|
||||||
.BR "USING DELIMITERS" .
|
.BR "using delimiters" .
|
||||||
Characters in data fields which happen to match the delimiter character
|
Characters in data fields which happen to match the delimiter character
|
||||||
will be quoted.
|
will be quoted.
|
||||||
.PP
|
.PP
|
||||||
@ -69,6 +79,7 @@ The actual format for each instance is
|
|||||||
.nf
|
.nf
|
||||||
<attr1><tab><attr2><tab>...<tab><attrn><newline>
|
<attr1><tab><attr2><tab>...<tab><attrn><newline>
|
||||||
.fi
|
.fi
|
||||||
|
The oid is placed on the beginning of the line if specified.
|
||||||
.PP
|
.PP
|
||||||
If
|
If
|
||||||
.BR copy
|
.BR copy
|
||||||
@ -111,12 +122,16 @@ this format must be followed
|
|||||||
Unsigned four-byte integer quantities are called uint32 in the below
|
Unsigned four-byte integer quantities are called uint32 in the below
|
||||||
description.
|
description.
|
||||||
.nf
|
.nf
|
||||||
uint32 totallength (not including itself),
|
The first value is:
|
||||||
uint32 number of null attributes
|
uint32 number of tuples
|
||||||
[uint32 attribute number of first null attribute
|
then for each tuple:
|
||||||
...
|
uint32 total length of data segment
|
||||||
uint32 attribute number of nth null attribute],
|
uint32 oid (if specified)
|
||||||
<data>
|
uint32 number of null attributes
|
||||||
|
[uint32 attribute number of first null attribute
|
||||||
|
...
|
||||||
|
uint32 attribute number of nth null attribute],
|
||||||
|
<data segment>
|
||||||
.fi
|
.fi
|
||||||
.bp
|
.bp
|
||||||
.SS "ALIGNMENT OF BINARY DATA"
|
.SS "ALIGNMENT OF BINARY DATA"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.\" This is -*-nroff-*-
|
.\" This is -*-nroff-*-
|
||||||
.\" XXX standard disclaimer belongs here....
|
.\" XXX standard disclaimer belongs here....
|
||||||
.\" $Header: /cvsroot/pgsql/doc/man/Attic/pg_dump.1,v 1.1.1.1 1996/08/18 22:14:26 scrappy Exp $
|
.\" $Header: /cvsroot/pgsql/doc/man/Attic/pg_dump.1,v 1.2 1996/09/19 20:09:02 scrappy Exp $
|
||||||
.TH PG_DUMP UNIX 1/20/96 Postgres95 Postgres95
|
.TH PG_DUMP UNIX 1/20/96 Postgres95 Postgres95
|
||||||
.SH NAME
|
.SH NAME
|
||||||
pg_dump \(em dumps out a Postgres database into a script file
|
pg_dump \(em dumps out a Postgres database into a script file
|
||||||
@ -21,8 +21,20 @@ port]
|
|||||||
.BR "-v"
|
.BR "-v"
|
||||||
]
|
]
|
||||||
[\c
|
[\c
|
||||||
|
.BR "-d[a]"
|
||||||
|
]
|
||||||
|
[\c
|
||||||
.BR "-S"
|
.BR "-S"
|
||||||
help]
|
help]
|
||||||
|
[\c
|
||||||
|
.BR "-a"
|
||||||
|
]
|
||||||
|
[\c
|
||||||
|
.BR "-t"
|
||||||
|
table]
|
||||||
|
[\c
|
||||||
|
.BR "-o"
|
||||||
|
]
|
||||||
dbname
|
dbname
|
||||||
.in -5n
|
.in -5n
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
Loading…
Reference in New Issue
Block a user