mirror of
https://github.com/postgres/postgres.git
synced 2025-05-18 17:41:14 +03:00
Doc: improve description of dump/restore's --clean and --if-exists.
Try to make these option descriptions a little clearer for novices. Per gripe from Attila Gulyás. Discussion: https://postgr.es/m/169590536647.3727336.11070254203649648453@wrigleys.postgresql.org
This commit is contained in:
parent
e4f73493c0
commit
83c05ed46a
@ -168,11 +168,12 @@ PostgreSQL documentation
|
|||||||
<term><option>--clean</option></term>
|
<term><option>--clean</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Output commands to clean (drop)
|
Output commands to <command>DROP</command> all the dumped
|
||||||
database objects prior to outputting the commands for creating them.
|
database objects prior to outputting the commands for creating them.
|
||||||
(Unless <option>--if-exists</option> is also specified,
|
This option is useful when the restore is to overwrite an existing
|
||||||
restore might generate some harmless error messages, if any objects
|
database. If any of the objects do not exist in the destination
|
||||||
were not present in the destination database.)
|
database, ignorable error messages will be reported during
|
||||||
|
restore, unless <option>--if-exists</option> is also specified.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -764,9 +765,11 @@ PostgreSQL documentation
|
|||||||
<term><option>--if-exists</option></term>
|
<term><option>--if-exists</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Use conditional commands (i.e., add an <literal>IF EXISTS</literal>
|
Use <literal>DROP ... IF EXISTS</literal> commands to drop objects
|
||||||
clause) when cleaning database objects. This option is not valid
|
in <option>--clean</option> mode. This suppresses <quote>does not
|
||||||
unless <option>--clean</option> is also specified.
|
exist</quote> errors that might otherwise be reported. This
|
||||||
|
option is not valid unless <option>--clean</option> is also
|
||||||
|
specified.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -90,9 +90,12 @@ PostgreSQL documentation
|
|||||||
<term><option>--clean</option></term>
|
<term><option>--clean</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Include SQL commands to clean (drop) databases before
|
Emit SQL commands to <command>DROP</command> all the dumped
|
||||||
recreating them. <command>DROP</command> commands for roles and
|
databases, roles, and tablespaces before recreating them.
|
||||||
tablespaces are added as well.
|
This option is useful when the restore is to overwrite an existing
|
||||||
|
cluster. If any of the objects do not exist in the destination
|
||||||
|
cluster, ignorable error messages will be reported during
|
||||||
|
restore, unless <option>--if-exists</option> is also specified.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -321,9 +324,11 @@ PostgreSQL documentation
|
|||||||
<term><option>--if-exists</option></term>
|
<term><option>--if-exists</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Use conditional commands (i.e., add an <literal>IF EXISTS</literal>
|
Use <literal>DROP ... IF EXISTS</literal> commands to drop objects
|
||||||
clause) to drop databases and other objects. This option is not valid
|
in <option>--clean</option> mode. This suppresses <quote>does not
|
||||||
unless <option>--clean</option> is also specified.
|
exist</quote> errors that might otherwise be reported. This
|
||||||
|
option is not valid unless <option>--clean</option> is also
|
||||||
|
specified.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -111,10 +111,12 @@ PostgreSQL documentation
|
|||||||
<term><option>--clean</option></term>
|
<term><option>--clean</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Clean (drop) database objects before recreating them.
|
Before restoring database objects, issue commands
|
||||||
(Unless <option>--if-exists</option> is used,
|
to <command>DROP</command> all the objects that will be restored.
|
||||||
this might generate some harmless error messages, if any objects
|
This option is useful for overwriting an existing database.
|
||||||
were not present in the destination database.)
|
If any of the objects do not exist in the destination database,
|
||||||
|
ignorable error messages will be reported,
|
||||||
|
unless <option>--if-exists</option> is also specified.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -575,9 +577,11 @@ PostgreSQL documentation
|
|||||||
<term><option>--if-exists</option></term>
|
<term><option>--if-exists</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Use conditional commands (i.e., add an <literal>IF EXISTS</literal>
|
Use <literal>DROP ... IF EXISTS</literal> commands to drop objects
|
||||||
clause) to drop database objects. This option is not valid
|
in <option>--clean</option> mode. This suppresses <quote>does not
|
||||||
unless <option>--clean</option> is also specified.
|
exist</quote> errors that might otherwise be reported. This
|
||||||
|
option is not valid unless <option>--clean</option> is also
|
||||||
|
specified.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user