Content-Length: 281930 | pFad | http://github.com/postgrespro/postgres/commit/59de132f9a578ae5d2909228484a61309df986e0

08 Fix oversight in pg_dump's handling of extension configuration tables. · postgrespro/postgres@59de132 · GitHub
Skip to content

Commit 59de132

Browse files
committed
Fix oversight in pg_dump's handling of extension configuration tables.
If an extension has not been selected to be dumped (perhaps because of a --schema or --table switch), the contents of its configuration tables surely should not get dumped either. Per gripe from Hubert Depesz Lubaczewski.
1 parent 97dc3c8 commit 59de132

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14179,13 +14179,18 @@ getExtensionMembership(Archive *fout, ExtensionInfo extinfo[],
1417914179
*/
1418014180
for (i = 0; i < numExtensions; i++)
1418114181
{
14182-
char *extconfig = extinfo[i].extconfig;
14183-
char *extcondition = extinfo[i].extcondition;
14182+
ExtensionInfo *curext = &(extinfo[i]);
14183+
char *extconfig = curext->extconfig;
14184+
char *extcondition = curext->extcondition;
1418414185
char **extconfigarray = NULL;
1418514186
char **extconditionarray = NULL;
1418614187
int nconfigitems;
1418714188
int nconditionitems;
1418814189

14190+
/* Tables of not-to-be-dumped extensions shouldn't be dumped */
14191+
if (!curext->dobj.dump)
14192+
continue;
14193+
1418914194
if (parsePGArray(extconfig, &extconfigarray, &nconfigitems) &&
1419014195
parsePGArray(extcondition, &extconditionarray, &nconditionitems) &&
1419114196
nconfigitems == nconditionitems)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/59de132f9a578ae5d2909228484a61309df986e0

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy