aboutsummaryrefslogtreecommitdiff
path: root/src/fe_utils/string_utils.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-09-06 14:53:31 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-09-06 14:53:31 -0400
commitcdc70597c9ba62aad08a46e55c0c783bf4c21c9c (patch)
treeef00e747810fa7903d9cae725cde4f6595cae690 /src/fe_utils/string_utils.c
parenta2ee579b6def8e0bde876c6c2fc9d4b8ec2b6b67 (diff)
downloadpostgresql-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.
Diffstat (limited to 'src/fe_utils/string_utils.c')
-rw-r--r--src/fe_utils/string_utils.c2
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;