Skip to content

Commit eb1c3b5

Browse files
committed
Fix pg_dump of ACLs of foreign servers. The command to grant/revoke
privileges of foreign servers is "GRANT ... ON *FOREIGN* SERVER ...".
1 parent 5e47403 commit eb1c3b5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/bin/pg_dump/dumputils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.c,v 1.55 2010/02/26 02:01:16 momjian Exp $
11+
* $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.c,v 1.56 2010/03/03 20:10:48 heikki Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -861,7 +861,7 @@ do { \
861861
CONVERT_PRIV('C', "CREATE");
862862
else if (strcmp(type, "FOREIGN DATA WRAPPER") == 0)
863863
CONVERT_PRIV('U', "USAGE");
864-
else if (strcmp(type, "SERVER") == 0)
864+
else if (strcmp(type, "FOREIGN SERVER") == 0)
865865
CONVERT_PRIV('U', "USAGE");
866866
else if (strcmp(type, "LARGE OBJECT") == 0)
867867
{

src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.575 2010/02/26 02:01:16 momjian Exp $
15+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.576 2010/03/03 20:10:48 heikki Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -10176,7 +10176,7 @@ dumpForeignServer(Archive *fout, ForeignServerInfo *srvinfo)
1017610176
/* Handle the ACL */
1017710177
namecopy = strdup(fmtId(srvinfo->dobj.name));
1017810178
dumpACL(fout, srvinfo->dobj.catId, srvinfo->dobj.dumpId,
10179-
"SERVER",
10179+
"FOREIGN SERVER",
1018010180
namecopy, NULL, srvinfo->dobj.name,
1018110181
NULL, srvinfo->rolname,
1018210182
srvinfo->srvacl);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy