1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

pg_dump and pg_restore were stripping quotes and downcasing some but

not all SQL identifiers taken from command line arguments.  We decided
years ago that that was a bad idea: identifiers taken from the command
line should be treated as literally correct.  Remove the inconsistent
code that has crept in recently.  Also fix pg_dump so that the combination
of --schema and --table does what you'd expect, namely dump exactly one
table from exactly one schema.  Per gripe from Deepak Bhole of Red Hat.
This commit is contained in:
Tom Lane
2003-06-11 16:29:42 +00:00
parent 7481b7d1e4
commit 8bfe93c5c8
4 changed files with 37 additions and 158 deletions

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.61 2003/04/17 15:34:37 momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.62 2003/06/11 16:29:42 tgl Exp $
PostgreSQL documentation
-->
@ -287,9 +287,9 @@ PostgreSQL documentation
<note>
<para>
In this mode, <application>pg_dump</application> makes no
attempt to dump any other database objects that may depend
upon objects in the selected schema. Therefore, there is no
guarantee that the results of a single schema dump can be
attempt to dump any other database objects that objects in the
selected schema may depend upon. Therefore, there is no
guarantee that the results of a single-schema dump can be
successfully restored by themselves into a clean database.
</para>
</note>
@ -394,18 +394,18 @@ PostgreSQL documentation
<listitem>
<para>
Dump data for <replaceable class="parameter">table</replaceable>
only. If <literal>*</literal> is specified, all tables in the
specified database will be dumped. It is possible for there to be
only. It is possible for there to be
multiple tables with the same name in different schemas; if that
is the case, all matching tables will be dumped.
is the case, all matching tables will be dumped. Specify both
<option>--schema</> and <option>--table</> to select just one table.
</para>
<note>
<para>
In this mode, <application>pg_dump</application> makes no
attempt to dump any other database objects that may depend
upon the selected table. Therefore, there is no guarantee
that the results of a single table dump can be successfully
attempt to dump any other database objects that the selected table
may depend upon. Therefore, there is no guarantee
that the results of a single-table dump can be successfully
restored by themselves into a clean database.
</para>
</note>
@ -652,7 +652,7 @@ CREATE DATABASE foo WITH TEMPLATE template0;
<para>
Once restored, it is wise to run <command>ANALYZE</> on each
restored object so the optimizer has useful statistics.
restored table so the optimizer has useful statistics.
</para>
</refsect1>

View File

@ -1,4 +1,4 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.38 2003/03/25 16:15:43 petere Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.39 2003/06/11 16:29:42 tgl Exp $ -->
<refentry id="APP-PGRESTORE">
<refmeta>
@ -269,7 +269,9 @@
<term><option>--function=<replaceable class="parameter">function-name(argtype [, ...])</replaceable></option></term>
<listitem>
<para>
Restore the named function only.
Restore the named function only. Be careful to spell the function
name and arguments exactly as they appear in the dump file's table
of contents.
</para>
</listitem>
</varlistentry>
@ -318,7 +320,7 @@
<term><option>--schema-only</option></term>
<listitem>
<para>
Restore only the schema (data defintions), not the data.
Restore only the schema (data definitions), not the data.
Sequence values will be reset.
</para>
</listitem>
@ -557,7 +559,7 @@ CREATE DATABASE foo WITH TEMPLATE template0;
<para>
Once restored, it is wise to run <command>ANALYZE</> on each
restored object so the optimizer has useful statistics.
restored table so the optimizer has useful statistics.
</para>
</refsect1>