Teach appendShellString() to not quote strings containing "-".

Brain fade in commit a00c58314: I was thinking that a string starting with
"-" could be taken as a switch depending on command line syntax.  That's
true, but having appendShellString() quote it will not help, so we may as
well not do so.  Per complaint from Peter Eisentraut.
This commit is contained in:
Tom Lane 2016-09-06 14:53:31 -04:00
parent a2ee579b6d
commit cdc70597c9

View File

@ -439,7 +439,7 @@ appendShellString(PQExpBuffer buf, const char *str)
* contains only safe characters.
*/
if (*str != '\0' &&
strspn(str, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_./:") == strlen(str))
strspn(str, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_./:") == strlen(str))
{
appendPQExpBufferStr(buf, str);
return;