mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
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.
This commit is contained in:
parent
97dc3c8a14
commit
59de132f9a
@ -14179,13 +14179,18 @@ getExtensionMembership(Archive *fout, ExtensionInfo extinfo[],
|
||||
*/
|
||||
for (i = 0; i < numExtensions; i++)
|
||||
{
|
||||
char *extconfig = extinfo[i].extconfig;
|
||||
char *extcondition = extinfo[i].extcondition;
|
||||
ExtensionInfo *curext = &(extinfo[i]);
|
||||
char *extconfig = curext->extconfig;
|
||||
char *extcondition = curext->extcondition;
|
||||
char **extconfigarray = NULL;
|
||||
char **extconditionarray = NULL;
|
||||
int nconfigitems;
|
||||
int nconditionitems;
|
||||
|
||||
/* Tables of not-to-be-dumped extensions shouldn't be dumped */
|
||||
if (!curext->dobj.dump)
|
||||
continue;
|
||||
|
||||
if (parsePGArray(extconfig, &extconfigarray, &nconfigitems) &&
|
||||
parsePGArray(extcondition, &extconditionarray, &nconditionitems) &&
|
||||
nconfigitems == nconditionitems)
|
||||
|
Loading…
Reference in New Issue
Block a user