From: Heikki Linnakangas Date: Wed, 3 Mar 2010 20:10:48 +0000 (+0000) Subject: Fix pg_dump of ACLs of foreign servers. The command to grant/revoke X-Git-Tag: REL9_0_ALPHA5~138 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb1c3b5e3b076f919f4c7f4864492f8c323088d2;p=postgresql Fix pg_dump of ACLs of foreign servers. The command to grant/revoke privileges of foreign servers is "GRANT ... ON *FOREIGN* SERVER ...". --- diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c index 82b3cb2688..124a458666 100644 --- a/src/bin/pg_dump/dumputils.c +++ b/src/bin/pg_dump/dumputils.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.c,v 1.55 2010/02/26 02:01:16 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.c,v 1.56 2010/03/03 20:10:48 heikki Exp $ * *------------------------------------------------------------------------- */ @@ -861,7 +861,7 @@ do { \ CONVERT_PRIV('C', "CREATE"); else if (strcmp(type, "FOREIGN DATA WRAPPER") == 0) CONVERT_PRIV('U', "USAGE"); - else if (strcmp(type, "SERVER") == 0) + else if (strcmp(type, "FOREIGN SERVER") == 0) CONVERT_PRIV('U', "USAGE"); else if (strcmp(type, "LARGE OBJECT") == 0) { diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 950f7ffdbd..44bdddaf88 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -12,7 +12,7 @@ * by PostgreSQL * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.575 2010/02/26 02:01:16 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.576 2010/03/03 20:10:48 heikki Exp $ * *------------------------------------------------------------------------- */ @@ -10176,7 +10176,7 @@ dumpForeignServer(Archive *fout, ForeignServerInfo *srvinfo) /* Handle the ACL */ namecopy = strdup(fmtId(srvinfo->dobj.name)); dumpACL(fout, srvinfo->dobj.catId, srvinfo->dobj.dumpId, - "SERVER", + "FOREIGN SERVER", namecopy, NULL, srvinfo->dobj.name, NULL, srvinfo->rolname, srvinfo->srvacl);