diff options
| author | Tom Lane | 2012-02-10 20:22:14 +0000 |
|---|---|---|
| committer | Tom Lane | 2012-02-10 20:22:14 +0000 |
| commit | 59de132f9a578ae5d2909228484a61309df986e0 (patch) | |
| tree | 34920bfbfdfdd83a518775ad86fb5497b28b43b6 | |
| parent | 97dc3c8a147c01da38570e4be7b4979af918dca2 (diff) | |
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.
| -rw-r--r-- | src/bin/pg_dump/pg_dump.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 91ca9fdd895..0175ce01732 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -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) |
