Allow pg_dump to include/exclude child tables automatically.
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/pg_dump.sgml | modified | +40 −2 |
| src/bin/pg_dump/pg_dump.c | modified | +73 −13 |
| src/bin/pg_dump/t/002_pg_dump.pl | modified | +458 −81 |
Documentation touched
Discussion
- [Proposal] Allow pg_dump to include all child tables with the root table 14 messages · 2023-01-11 → 2023-03-14