mirror of
https://github.com/postgres/postgres.git
synced 2025-08-06 18:42:54 +03:00
pg_dump -z has gotten rather thoroughly broken in the last couple
of days --- it was emitting stuff like REVOKE ALL on 'table' from PUBLIC; GRANT ALL on "table" to "Public"; neither of which work. While I was at it I cleaned up a few other things: * \connect commands are issued only in -z mode. In this way, reloading a pg_dump script made without -z will generate a simple database wholly owned by the invoking user, rather than a mishmash of tables owned by various people but lacking in access rights. (Analogy: cp versus cp -p.) * \connect commands are issued just before COPY FROM stdin commands; without this, reloading a database containing non-world-writable tables tended to fail because the COPY was not necessarily attempted as the table owner. * Redundant \connect commands are suppressed (each one costs a backend launch, so...). * Man page updated (-z wasn't ever documented). The first two items were discussed in a pgsql-hackers thread around 6 May 98 ("An item for the TODO list: pg_dump and multiple table owners") but no one had bothered to deal with 'em yet. regards, tom lane
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
.\" This is -*-nroff-*-
|
||||
.\" XXX standard disclaimer belongs here....
|
||||
.\" $Header: /cvsroot/pgsql/src/man/Attic/pg_dump.1,v 1.11 1998/06/24 13:21:28 momjian Exp $
|
||||
.TH PG_DUMP UNIX 1/20/96 PostgreSQL PostgreSQL
|
||||
.\" $Header: /cvsroot/pgsql/src/man/Attic/pg_dump.1,v 1.12 1998/07/19 05:24:51 momjian Exp $
|
||||
.TH PG_DUMP UNIX 7/15/98 PostgreSQL PostgreSQL
|
||||
.SH NAME
|
||||
pg_dump - dumps out a Postgres database into a script file
|
||||
.SH SYNOPSIS
|
||||
@@ -36,23 +36,27 @@ port]
|
||||
.BR "-t"
|
||||
table]
|
||||
[\c
|
||||
.BR "-u"
|
||||
]
|
||||
[\c
|
||||
.BR "-v"
|
||||
]
|
||||
[\c
|
||||
.BR "-u"]
|
||||
.BR "-z"
|
||||
]
|
||||
dbname
|
||||
.in -5n
|
||||
.SH DESCRIPTION
|
||||
.IR "pg_dump"
|
||||
is a utility for dumping out a
|
||||
Postgres database into a script file containing query commands. The script
|
||||
files are in a ASCII format and can be used to reconstruct the database,
|
||||
files are in ASCII format and can be used to reconstruct the database,
|
||||
even on other machines and other architectures.
|
||||
.IR "pg_dump"
|
||||
will produce the queries necessary to re-generate all
|
||||
user-defined types, functions, tables, indices, aggregates, and
|
||||
operators. In addition, all the data is copied out in ASCII format so
|
||||
that it can be readily copied in again, as well, as imported into tools
|
||||
that it can be readily copied in again, as well as imported into tools
|
||||
for textual editing.
|
||||
.PP
|
||||
.IR "pg_dump"
|
||||
@@ -92,10 +96,13 @@ Dump out only the schema, no data
|
||||
Dump for this table only
|
||||
.TP
|
||||
.BR "-u"
|
||||
Use password authentication. Prompts for username and password.
|
||||
Use password authentication. Prompts for username and password
|
||||
.TP
|
||||
.BR "-v" ""
|
||||
Specifies verbose mode
|
||||
.TP
|
||||
.BR "-z" ""
|
||||
Include ACLs (grant/revoke commands) and table ownership information
|
||||
.PP
|
||||
If dbname is not supplied, then the DATABASE environment variable value is used.
|
||||
.SH "CAVEATS AND LIMITATIONS"
|
||||
|
Reference in New Issue
Block a user