Fix improper usage of 'dump' bitmap
authorStephen Frost <sfrost@snowman.net>
Fri, 8 Apr 2016 20:30:02 +0000 (16:30 -0400)
committerStephen Frost <sfrost@snowman.net>
Fri, 8 Apr 2016 20:30:02 +0000 (16:30 -0400)
Now that 'dump' is a bitmap, we can't simply set it to 'true'.

Noticed while debugging the prior issue.

src/bin/pg_dump/pg_dump_sort.c

index 36de6b625739c8da40dc5e5df61aa2aaa14259dc..dc35a93727541650ffeeaba68df4cf8b860c41b5 100644 (file)
@@ -848,9 +848,14 @@ repairTypeFuncLoop(DumpableObject *typeobj, DumpableObject *funcobj)
        if (typeInfo->shellType)
        {
                addObjectDependency(funcobj, typeInfo->shellType->dobj.dumpId);
-               /* Mark shell type as to be dumped if any such function is */
+               /*
+                * Mark shell type (always including the definition, as we need
+                * the shell type defined to identify the function fully) as to be
+                * dumped if any such function is
+                */
                if (funcobj->dump)
-                       typeInfo->shellType->dobj.dump = true;
+                       typeInfo->shellType->dobj.dump = funcobj->dump |
+                                                                                        DUMP_COMPONENT_DEFINITION;
        }
 }