aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-03-14 22:45:49 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-03-14 22:45:49 +0000
commit2a44306396f053269b5a42a60cf7a54a52608b9a (patch)
tree4f8816fb32bb53c715f64f9203b5ca4d77d95de3
parentc90354bad0839b8beb0340818320e2251c8a3f22 (diff)
downloadpostgresql-2a44306396f053269b5a42a60cf7a54a52608b9a.tar.gz
postgresql-2a44306396f053269b5a42a60cf7a54a52608b9a.zip
pg_dumpall failed on groups having no members. Per report from
Nick Eskelinen.
-rw-r--r--src/bin/pg_dump/pg_dumpall.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 7970651e800..52facb459a5 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -6,7 +6,7 @@
* 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)
val = strdup(PQgetvalue(res, i, 2));
tok = strtok(val, ",{}");
- do
+ while (tok)
{
PGresult *res2;
PQExpBuffer buf2 = createPQExpBuffer();
@@ -347,7 +347,7 @@ dumpGroups(PGconn *conn)
tok = strtok(NULL, "{},");
}
- while (tok);
+ free(val);
printf("%s", buf->data);
destroyPQExpBuffer(buf);