Commit 2a443063 authored by Tom Lane's avatar Tom Lane

pg_dumpall failed on groups having no members. Per report from

Nick Eskelinen.
parent c90354ba
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* *
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.15 2003/03/06 21:45:52 tgl Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.16 2003/03/14 22:45:49 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -327,7 +327,7 @@ dumpGroups(PGconn *conn) ...@@ -327,7 +327,7 @@ dumpGroups(PGconn *conn)
val = strdup(PQgetvalue(res, i, 2)); val = strdup(PQgetvalue(res, i, 2));
tok = strtok(val, ",{}"); tok = strtok(val, ",{}");
do while (tok)
{ {
PGresult *res2; PGresult *res2;
PQExpBuffer buf2 = createPQExpBuffer(); PQExpBuffer buf2 = createPQExpBuffer();
...@@ -347,7 +347,7 @@ dumpGroups(PGconn *conn) ...@@ -347,7 +347,7 @@ dumpGroups(PGconn *conn)
tok = strtok(NULL, "{},"); tok = strtok(NULL, "{},");
} }
while (tok); free(val);
printf("%s", buf->data); printf("%s", buf->data);
destroyPQExpBuffer(buf); destroyPQExpBuffer(buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment