From 6ec4520a5bfbcdc137a3204cfdbdea6bfd5e06b4 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sun, 8 Aug 2004 06:58:00 +0000 Subject: [PATCH] Supress warning about zero-length format string. --- src/bin/pg_dump/pg_dumpall.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index a79cf836b2..f05623186d 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 * * - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.47 2004/08/08 06:44:33 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.48 2004/08/08 06:58:00 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -858,9 +858,11 @@ runPgDump(const char *dbname) #ifndef WIN32 if (*p == '\'') appendPQExpBuffer(cmd, "'\"'\"'"); - else +#else + if (*p == '"') + appendPQExpBuffer(cmd, "\\\""); #endif - /* not needed on Win32 */ + else appendPQExpBufferChar(cmd, *p); } @@ -868,10 +870,8 @@ runPgDump(const char *dbname) appendPQExpBufferChar(cmd, '\''); #else appendPQExpBufferChar(cmd, '"'); + appendPQExpBuffer(cmd, SYSTEMQUOTE); #endif - - if (strlen(SYSTEMQUOTE) > 0) - appendPQExpBuffer(cmd, SYSTEMQUOTE); if (verbose) fprintf(stderr, _("%s: running \"%s\"\n"), progname, cmd->data);