]> granicus.if.org Git - postgresql/commitdiff
pg_dump support for comments on FOREIGN DATA WRAPPER and SERVER objects.
authorRobert Haas <rhaas@postgresql.org>
Fri, 1 Apr 2011 15:40:37 +0000 (11:40 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 1 Apr 2011 15:41:07 +0000 (11:41 -0400)
Shigeru Hanada, with some corrections.

src/bin/pg_dump/pg_dump.c

index 5561295e50c64069e8b67a804a1512f14f12b9b5..90cb9ab97165d10b96e76ad4e2a9e9d729aedd31 100644 (file)
@@ -11059,6 +11059,11 @@ dumpForeignDataWrapper(Archive *fout, FdwInfo *fdwinfo)
                        NULL, fdwinfo->rolname,
                        fdwinfo->fdwacl);
 
+       /* Dump Foreign Data Wrapper Comments */
+       dumpComment(fout, labelq->data,
+                               NULL, fdwinfo->rolname,
+                               fdwinfo->dobj.catId, 0, fdwinfo->dobj.dumpId);
+
        free(qfdwname);
 
        destroyPQExpBuffer(q);
@@ -11163,6 +11168,11 @@ dumpForeignServer(Archive *fout, ForeignServerInfo *srvinfo)
                                         srvinfo->rolname,
                                         srvinfo->dobj.catId, srvinfo->dobj.dumpId);
 
+       /* Dump Foreign Server Comments */
+       dumpComment(fout, labelq->data,
+                               NULL, srvinfo->rolname,
+                               srvinfo->dobj.catId, 0, srvinfo->dobj.dumpId);
+
        free(qsrvname);
 
        destroyPQExpBuffer(q);