summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-03-14 16:09:03 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-03-14 16:09:03 -0400
commita563c24c9574b74f4883c004c89275bba03c3c26 (patch)
tree0c868d94031103906136e74469e869cc63505f42 /doc/src
parent684ffac8c7d2647d919495727d469c73129202ea (diff)
Allow pg_dump to include/exclude child tables automatically.
This patch adds new pg_dump switches --table-and-children=pattern --exclude-table-and-children=pattern --exclude-table-data-and-children=pattern which act the same as the existing --table, --exclude-table, and --exclude-table-data switches, except that any partitions or inheritance child tables of the table(s) matching the pattern are also included or excluded. Gilles Darold, reviewed by Stéphane Tachoires Discussion: https://postgr.es/m/5aa393b5-5f67-8447-b83e-544516990ee2@migops.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/pg_dump.sgml42
1 files changed, 40 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 334e4b7fd14..e6b003bf104 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -776,6 +776,19 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--exclude-table-and-children=<replaceable class="parameter">pattern</replaceable></option></term>
+ <listitem>
+ <para>
+ This is the same as
+ the <option>-T</option>/<option>--exclude-table</option> option,
+ except that it also excludes any partitions or inheritance child
+ tables of the table(s) matching the
+ <replaceable class="parameter">pattern</replaceable>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--exclude-table-data=<replaceable class="parameter">pattern</replaceable></option></term>
<listitem>
<para>
@@ -794,6 +807,18 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--exclude-table-data-and-children=<replaceable class="parameter">pattern</replaceable></option></term>
+ <listitem>
+ <para>
+ This is the same as the <option>--exclude-table-data</option> option,
+ except that it also excludes data of any partitions or inheritance
+ child tables of the table(s) matching the
+ <replaceable class="parameter">pattern</replaceable>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--extra-float-digits=<replaceable class="parameter">ndigits</replaceable></option></term>
<listitem>
<para>
@@ -1142,9 +1167,9 @@ PostgreSQL documentation
Require that each
extension (<option>-e</option>/<option>--extension</option>),
schema (<option>-n</option>/<option>--schema</option>) and
- table (<option>-t</option>/<option>--table</option>) qualifier
+ table (<option>-t</option>/<option>--table</option>) pattern
match at least one extension/schema/table in the database to be dumped.
- Note that if none of the extension/schema/table qualifiers find
+ Note that if none of the extension/schema/table patterns find
matches, <application>pg_dump</application> will generate an error
even without <option>--strict-names</option>.
</para>
@@ -1159,6 +1184,19 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--table-and-children=<replaceable class="parameter">pattern</replaceable></option></term>
+ <listitem>
+ <para>
+ This is the same as
+ the <option>-t</option>/<option>--table</option> option,
+ except that it also includes any partitions or inheritance child
+ tables of the table(s) matching the
+ <replaceable class="parameter">pattern</replaceable>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--use-set-session-authorization</option></term>
<listitem>
<para>