Skip to content

Commit e752861

Browse files
committed
Allow GROUPs to be dumped properly.
1 parent 9474dd7 commit e752861

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*
2323
* IDENTIFICATION
24-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.110 1999/05/26 16:06:45 momjian Exp $
24+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.111 1999/05/26 19:45:53 momjian Exp $
2525
*
2626
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2727
*
@@ -2626,7 +2626,6 @@ dumpACL(FILE *fout, TableInfo tbinfo)
26262626
/* Scan comma-separated ACL items */
26272627
for (tok = strtok(aclbuf, ","); tok != NULL; tok = strtok(NULL, ","))
26282628
{
2629-
26302629
/*
26312630
* Token may start with '{' and/or '"'. Actually only the start
26322631
* of the string should have '{', but we don't verify that.
@@ -2668,7 +2667,10 @@ dumpACL(FILE *fout, TableInfo tbinfo)
26682667
else
26692668
{
26702669
*eqpos = '\0'; /* it's ok to clobber aclbuf */
2671-
fprintf(fout, "%s;\n", fmtId(tok, force_quotes));
2670+
if (strncmp(tok, "group ",strlen("group ")) == 0)
2671+
fprintf(fout, "GROUP %s;\n",
2672+
fmtId(tok + sizeof("group ") - 1, force_quotes));
2673+
else fprintf(fout, "%s;\n", fmtId(tok, force_quotes));
26722674
}
26732675
}
26742676
free(priv);

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