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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy