From d8e06cdf24a13f920707207c03f39c7c1b073794 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 26 May 1999 19:45:53 +0000 Subject: [PATCH] Allow GROUPs to be dumped properly. --- src/bin/pg_dump/pg_dump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 2387c425b2..0a2418d636 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -2626,7 +2626,6 @@ dumpACL(FILE *fout, TableInfo tbinfo) /* Scan comma-separated ACL items */ for (tok = strtok(aclbuf, ","); tok != NULL; tok = strtok(NULL, ",")) { - /* * Token may start with '{' and/or '"'. Actually only the start * of the string should have '{', but we don't verify that. @@ -2668,7 +2667,10 @@ dumpACL(FILE *fout, TableInfo tbinfo) else { *eqpos = '\0'; /* it's ok to clobber aclbuf */ - fprintf(fout, "%s;\n", fmtId(tok, force_quotes)); + if (strncmp(tok, "group ",strlen("group ")) == 0) + fprintf(fout, "GROUP %s;\n", + fmtId(tok + sizeof("group ") - 1, force_quotes)); + else fprintf(fout, "%s;\n", fmtId(tok, force_quotes)); } } free(priv); -- 2.39.5