- Notifications
You must be signed in to change notification settings - Fork4.9k
Commita5cf808
committed
Read include/exclude commands for dump/restore from file
When there is a need to filter multiple tables with include and/or excludeoptions 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_restorewhich is used to supply a file containing object exclude/include commandswhich work just like their commandline counterparts. The format of the fileis one command per row like: <command> <object> <objectpattern><command> can be "include" or "exclude", <object> can be table_data, indextable_data_and_children, database, extension, foreign_data, function, tableschema, table_and_children or trigger.This patch has gone through many revisions and design changes over a longperiod of time, the list of reviewers reflect reviewers of some version ofthe 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.com1 parent15c9ac3 commita5cf808
File tree
13 files changed
+1872
-2
lines changed- doc/src/sgml/ref
- src
- bin/pg_dump
- t
- tools
- msvc
- pgindent
13 files changed
+1872
-2
lines changedLines changed: 117 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
836 | 836 |
| |
837 | 837 |
| |
838 | 838 |
| |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
839 | 942 |
| |
840 | 943 |
| |
841 | 944 |
| |
| |||
1168 | 1271 |
| |
1169 | 1272 |
| |
1170 | 1273 |
| |
| 1274 | + | |
1171 | 1275 |
| |
1172 | 1276 |
| |
1173 | 1277 |
| |
| |||
1611 | 1715 |
| |
1612 | 1716 |
| |
1613 | 1717 |
| |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
1614 | 1731 |
| |
1615 | 1732 |
| |
1616 | 1733 |
| |
|
Lines changed: 31 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
128 | 159 |
| |
129 | 160 |
| |
130 | 161 |
| |
|
Lines changed: 80 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
193 | 273 |
| |
194 | 274 |
| |
195 | 275 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
| 35 | + | |
35 | 36 |
| |
36 | 37 |
| |
37 | 38 |
| |
| |||
49 | 50 |
| |
50 | 51 |
| |
51 | 52 |
| |
52 |
| - | |
53 |
| - | |
| 53 | + | |
| 54 | + | |
54 | 55 |
| |
55 | 56 |
| |
56 | 57 |
| |
|
0 commit comments
Comments
(0)