mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add --section option to pg_dump and pg_restore.
Valid values are --pre-data, data and post-data. The option can be given more than once. --schema-only is equivalent to --section=pre-data --section=post-data. --data-only is equivalent to --section=data. Andrew Dunstan, reviewed by Joachim Wieland and Josh Berkus.
This commit is contained in:
@ -116,9 +116,7 @@ PostgreSQL documentation
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This option is only meaningful for the plain-text format. For
|
||||
the archive formats, you can specify the option when you
|
||||
call <command>pg_restore</command>.
|
||||
This option is equivalent to specifying <option>--section=data</>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -408,9 +406,29 @@ PostgreSQL documentation
|
||||
To exclude table data for only a subset of tables in the database,
|
||||
see <option>--exclude-table-data</>.
|
||||
</para>
|
||||
<para>
|
||||
This option is equivalent to specifying
|
||||
<option>--section=pre-data --section=post-data</>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--section=<replaceable class="parameter">sectionname</replaceable></option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Only dump the named section. The name can be one of <option>pre-data</>, <option>data</>
|
||||
and <option>post-data</>.
|
||||
This option can be specified more than once. The default is to dump all sections.
|
||||
</para>
|
||||
<para>
|
||||
Post-data items consist of definitions of indexes, triggers, rules
|
||||
and constraints other than check constraints.
|
||||
Pre-data items consist of all other data definition items.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-S <replaceable class="parameter">username</replaceable></option></term>
|
||||
<term><option>--superuser=<replaceable class="parameter">username</replaceable></option></term>
|
||||
|
@ -93,6 +93,9 @@
|
||||
<para>
|
||||
Restore only the data, not the schema (data definitions).
|
||||
</para>
|
||||
<para>
|
||||
This option is equivalent to specifying <option>--section=data</>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@ -359,6 +362,10 @@
|
||||
(Do not confuse this with the <option>--schema</> option, which
|
||||
uses the word <quote>schema</> in a different meaning.)
|
||||
</para>
|
||||
<para>
|
||||
This option is equivalent to specifying
|
||||
<option>--section=pre-data --section=post-data</>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@ -504,6 +511,22 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--section=<replaceable class="parameter">sectionname</replaceable></option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Only restore the named section. The name can be one of <option>pre-data</>, <option>data</>
|
||||
and <option>post-data</>.
|
||||
This option can be specified more than once. The default is to restore all sections.
|
||||
</para>
|
||||
<para>
|
||||
Post-data items consist of definitions of indexes, triggers, rules
|
||||
and constraints other than check constraints.
|
||||
Pre-data items consist of all other data definition items.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--use-set-session-authorization</option></term>
|
||||
<listitem>
|
||||
|
Reference in New Issue
Block a user