git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 15c9ac3) | patch
Read include/exclude commands for dump/restore from file
2023年11月29日 13:56:24 +0000 (14:56 +0100)
2023年11月29日 13:56:24 +0000 (14:56 +0100)
commit a5cf808be55bcc68c3917c380f95122436af1be1
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 patch 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 patch, not necessarily the final version.

Patch by Pavel Stehule with some additional hacking by me.

Author: Pavel Stehule <pavel.stehule@gmail.com>
Reviewed-by: Justin Pryzby <pryzby@telsasoft.com>
Reviewed-by: vignesh C <vignesh21@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com>
Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Erik Rijkers <er@xs4all.nl>
Discussion: https://postgr.es/m/CAFj8pRB10wvW0CC9Xq=1XDs=zCQxer3cbLcNZa+qiX4cUH-G_A@mail.gmail.com
13 files changed:
doc/src/sgml/ref/pg_dump.sgml diff | blob | blame | history
doc/src/sgml/ref/pg_dumpall.sgml diff | blob | blame | history
doc/src/sgml/ref/pg_restore.sgml diff | blob | blame | history
src/bin/pg_dump/Makefile diff | blob | blame | history
src/bin/pg_dump/filter.c [new file with mode: 0644] blob
src/bin/pg_dump/filter.h [new file with mode: 0644] blob
src/bin/pg_dump/meson.build diff | blob | blame | history
src/bin/pg_dump/pg_dump.c diff | blob | blame | history
src/bin/pg_dump/pg_dumpall.c diff | blob | blame | history
src/bin/pg_dump/pg_restore.c diff | blob | blame | history
src/bin/pg_dump/t/005_pg_dump_filterfile.pl [new file with mode: 0644] blob
src/tools/msvc/Mkvcbuild.pm diff | blob | blame | history
src/tools/pgindent/typedefs.list diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /