Fix pg_dump of ACLs of foreign servers. The command to grant/revoke

privileges of foreign servers is "GRANT ... ON *FOREIGN* SERVER ...".
This commit is contained in:
Heikki Linnakangas 2010-03-03 20:10:42 +00:00
parent 40c5457e60
commit cad1ddf17c
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.c,v 1.46 2009/06/11 14:49:07 momjian Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.c,v 1.46.2.1 2010/03/03 20:10:42 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@ -756,7 +756,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
abort();

View File

@ -12,7 +12,7 @@
* by PostgreSQL
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.539.2.3 2009/11/20 20:54:20 tgl Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.539.2.4 2010/03/03 20:10:42 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@ -9494,7 +9494,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);