diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-09-06 14:53:31 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-09-06 14:53:31 -0400 |
commit | cdc70597c9ba62aad08a46e55c0c783bf4c21c9c (patch) | |
tree | ef00e747810fa7903d9cae725cde4f6595cae690 | |
parent | a2ee579b6def8e0bde876c6c2fc9d4b8ec2b6b67 (diff) | |
download | postgresql-cdc70597c9ba62aad08a46e55c0c783bf4c21c9c.tar.gz postgresql-cdc70597c9ba62aad08a46e55c0c783bf4c21c9c.zip |
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.
-rw-r--r-- | src/fe_utils/string_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fe_utils/string_utils.c b/src/fe_utils/string_utils.c index edbc869e453..61bf9e6ca60 100644 --- a/src/fe_utils/string_utils.c +++ b/src/fe_utils/string_utils.c @@ -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; |