Read include/exclude commands for dump/restore from file
When there is a need to filter multiple tables with include and/or exclude
options it's quite possible to run into the limitations of the commandline.
This adds a --filter=FILENAME feature to pg_dump, pg_dumpall and pg_restore
which is used to supply a file containing object exclude/include commands
which work just like their commandline counterparts. The format of the file
is one command per row like:
<command> <object> <objectpattern>
<command> can be "include" or "exclude", <object> can be table_data, index
table_data_and_children, database, extension, foreign_data, function, table
schema, table_and_children or trigger.
This has gone through many revisions and design changes over a long
period of time, the list of reviewers reflect reviewers of some version of
the , not necessarily the final version.
by Pavel Stehule with some additional hacking by me.
Author: Pavel Stehule <
[email protected]>
Reviewed-by: Justin Pryzby <[email protected]>Reviewed-by: vignesh C <[email protected]>Reviewed-by: Dean Rasheed <[email protected]>Reviewed-by: Tomas Vondra <[email protected]>Reviewed-by: Julien Rouhaud <[email protected]>Reviewed-by: Erik Rijkers <[email protected]>Discussion: https://postgr.es/m/CAFj8pRB10wvW0CC9Xq=1XDs=zCQxer3cbLcNZa+qiX4cUH-G_A@mail.gmail.com