summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/pg_dump/pg_dump.c9
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 6afb800a6d1..fcfc19b9668 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -13794,13 +13794,18 @@ getExtensionMembership(ExtensionInfo extinfo[], int numExtensions)
*/
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)