mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
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:
parent
a2ee579b6d
commit
cdc70597c9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user