const char *name2);
static void dumpDatabases(PGconn *conn);
static void dumpTimestamp(char *msg);
-static void doShellQuoting(PQExpBuffer buf, const char *str);
-static void doConnStrQuoting(PQExpBuffer buf, const char *str);
+static void appendShellString(PQExpBuffer buf, const char *str);
+static void appendConnStrVal(PQExpBuffer buf, const char *str);
static int runPgDump(const char *dbname);
static void buildShSecLabels(PGconn *conn, const char *catalog_name,
case 'f':
filename = optarg;
appendPQExpBuffer(pgdumpopts, " -f ");
- doShellQuoting(pgdumpopts, filename);
+ appendShellString(pgdumpopts, filename);
break;
case 'g':
case 'h':
pghost = optarg;
appendPQExpBuffer(pgdumpopts, " -h ");
- doShellQuoting(pgdumpopts, pghost);
+ appendShellString(pgdumpopts, pghost);
break;
case 'i':
case 'p':
pgport = optarg;
appendPQExpBuffer(pgdumpopts, " -p ");
- doShellQuoting(pgdumpopts, pgport);
+ appendShellString(pgdumpopts, pgport);
break;
case 'r':
case 'S':
appendPQExpBuffer(pgdumpopts, " -S ");
- doShellQuoting(pgdumpopts, optarg);
+ appendShellString(pgdumpopts, optarg);
break;
case 't':
case 'U':
pguser = optarg;
appendPQExpBuffer(pgdumpopts, " -U ");
- doShellQuoting(pgdumpopts, pguser);
+ appendShellString(pgdumpopts, pguser);
break;
case 'v':
case 2:
appendPQExpBuffer(pgdumpopts, " --lock-wait-timeout ");
- doShellQuoting(pgdumpopts, optarg);
+ appendShellString(pgdumpopts, optarg);
break;
case 3:
use_role = optarg;
appendPQExpBuffer(pgdumpopts, " --role ");
- doShellQuoting(pgdumpopts, use_role);
+ appendShellString(pgdumpopts, use_role);
break;
default:
* incorrectly treat it as a connection string.
*/
appendPQExpBufferStr(connstrbuf, "dbname=");
- doConnStrQuoting(connstrbuf, dbname);
+ appendConnStrVal(connstrbuf, dbname);
- doShellQuoting(cmd, connstrbuf->data);
+ appendShellString(cmd, connstrbuf->data);
appendPQExpBuffer(cmd, "%s", SYSTEMQUOTE);
* string
*/
static void
-doConnStrQuoting(PQExpBuffer buf, const char *str)
+appendConnStrVal(PQExpBuffer buf, const char *str)
{
const char *s;
bool needquotes;
* there eventually leads to errors here.
*/
static void
-doShellQuoting(PQExpBuffer buf, const char *str)
+appendShellString(PQExpBuffer buf, const char *str)
{
const char *p;