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

Commit 2bd6311

Browse files
committed
[ dumping schemas ]
> I don't care what you use for short options if all useful ones are taken. > But the long option should be --schema. Ok, fair enough: a revised patch is attached that uses the '-n' short option and the '--schema' long option. Neil Conway
1 parent 6d8b8a5 commit 2bd6311

File tree

3 files changed

+189
-73
lines changed

3 files changed

+189
-73
lines changed

doc/src/sgml/ref/pg_dump.sgml

+48-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.55 2003/01/19 00:13:30 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.56 2003/02/13 04:54:15 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -283,6 +283,28 @@ PostgreSQL documentation
283283
</listitem>
284284
</varlistentry>
285285

286+
<varlistentry>
287+
<term><option>-n <replaceable class="parameter">namespace</replaceable></option></term>
288+
<term><option>--schema=<replaceable class="parameter">schema</replaceable></option></term>
289+
<listitem>
290+
<para>
291+
Dump the contents of <replaceable class="parameter">schema</>
292+
only. If this option is not specified, all non-system schemas
293+
in the target database will be dumped.
294+
</para>
295+
296+
<note>
297+
<para>
298+
In this mode, <application>pg_dump</application> makes no
299+
attempt to dump any other database objects that may depend
300+
upon objects in the selected schema. Therefore, there is no
301+
guarantee that the results of a single schema dump can be
302+
successfully restored by themselves into a clean database.
303+
</para>
304+
</note>
305+
</listitem>
306+
</varlistentry>
307+
286308
<varlistentry>
287309
<term><option>-o</></term>
288310
<term><option>--oids</></term>
@@ -380,8 +402,22 @@ PostgreSQL documentation
380402
<term><option>--table=<replaceable class="parameter">table</replaceable></option></term>
381403
<listitem>
382404
<para>
383-
Dump data for <replaceable class="parameter">table</replaceable> only.
384-
</para>
405+
Dump data for <replaceable class="parameter">table</replaceable>
406+
only. If <literal>*</literal> is specified, all tables in the
407+
specified database will be dumped. It is possible for there to be
408+
multiple tables with the same name in different schemas; if that
409+
is the case, all matching tables will be dumped.
410+
</para>
411+
412+
<note>
413+
<para>
414+
In this mode, <application>pg_dump</application> makes no
415+
attempt to dump any other database objects that may depend
416+
upon the selected table. Therefore, there is no guarantee
417+
that the results of a single table dump can be successfully
418+
restored by themselves into a clean database.
419+
</para>
420+
</note>
385421
</listitem>
386422
</varlistentry>
387423

@@ -495,10 +531,9 @@ PostgreSQL documentation
495531
<term><option>--host=<replaceable class="parameter">host</replaceable></option></term>
496532
<listitem>
497533
<para>
498-
Specifies the host name of the machine on which the
499-
server
500-
is running. If host begins with a slash, it is used
501-
as the directory for the Unix domain socket.
534+
Specifies the host name of the machine on which the server is
535+
running. If the host name begins with a slash, it is used as the
536+
directory for the Unix domain socket.
502537
</para>
503538
</listitem>
504539
</varlistentry>
@@ -551,7 +586,7 @@ PostgreSQL documentation
551586

552587
<listitem>
553588
<para>
554-
Default connection parameters
589+
Default connection parameters.
555590
</para>
556591
</listitem>
557592
</varlistentry>
@@ -578,11 +613,10 @@ connectDBStart() -- connect() failed: No such file or directory
578613

579614
<msgexplan>
580615
<para>
581-
<application>pg_dump</application> could not attach to the
582-
PostgreSQL server on the specified host and port. If you see this message,
583-
ensure that the server
584-
is running on the proper host and that you have specified the proper
585-
port.
616+
<application>pg_dump</application> could not connect to the
617+
PostgreSQL server on the specified host and port. If you see this
618+
message, ensure that the server is running on the proper host and
619+
that you have specified the proper port.
586620
</para>
587621
</msgexplan>
588622
</msgentry>
@@ -630,7 +664,7 @@ CREATE DATABASE foo WITH TEMPLATE template0;
630664

631665
<listitem>
632666
<para>
633-
When doing a data only dump, <application>pg_dump</application> emits queries
667+
When doing a data-only dump, <application>pg_dump</application> emits queries
634668
to disable triggers on user tables before inserting the data and queries to
635669
re-enable them after the data has been inserted. If the restore is stopped
636670
in the middle, the system catalogs may be left in the wrong state.

src/bin/pg_dump/pg_backup_db.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Implements the basic DB functions used by the archiver.
66
*
77
* IDENTIFICATION
8-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.44 2003/02/01 22:06:59 tgl Exp $
8+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.45 2003/02/13 04:54:15 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -62,7 +62,7 @@ _check_database_version(ArchiveHandle *AH, bool ignoreVersion)
6262
myversion = _parse_version(AH, PG_VERSION);
6363

6464
/*
65-
* Autocommit could be off. We turn it off later but we have to check
65+
* Autocommit could be off. We turn it on later but we have to check
6666
* the database version first.
6767
*/
6868

0 commit comments

Comments
 (0)