diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-06-20 13:02:42 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-06-20 13:03:29 -0400 |
commit | a69dfe5f40f77d586e8d4d9ecfc39d81612c7dda (patch) | |
tree | b1d5320ca500fd4c6ee730b6c7455f8c534970f2 /src/backend/utils/adt/varlena.c | |
parent | a2141c42f9ebc51b4501a4fafea9dd3fb7eda23d (diff) | |
download | postgresql-a69dfe5f40f77d586e8d4d9ecfc39d81612c7dda.tar.gz postgresql-a69dfe5f40f77d586e8d4d9ecfc39d81612c7dda.zip |
Don't downcase entries within shared_preload_libraries et al.
load_libraries(), which processes the various xxx_preload_libraries GUCs,
was parsing them using SplitIdentifierString() which isn't really
appropriate for values that could be path names: it downcases unquoted
text, and it doesn't allow embedded whitespace unless quoted.
Use SplitDirectoriesString() instead. That also allows us to simplify
load_libraries() a bit, since canonicalize_path() is now done for it.
While this definitely seems like a bug fix, it has the potential to
break configuration settings that accidentally worked before because
of the downcasing behavior. Also, there's an easy workaround for the
bug, namely to double-quote troublesome text. Hence, no back-patch.
QL Zhuo, tweaked a bit by me
Discussion: https://postgr.es/m/CAB-oJtxHVDc3H+Km3CjB9mY1VDzuyaVH_ZYSz7iXcRqCtb93Ew@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/varlena.c')
-rw-r--r-- | src/backend/utils/adt/varlena.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index a21c6899596..5fe82400e72 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -3347,7 +3347,9 @@ SplitIdentifierString(char *rawstring, char separator, /* - * SplitDirectoriesString --- parse a string containing directory names + * SplitDirectoriesString --- parse a string containing file/directory names + * + * This works fine on file names too; the function name is historical. * * This is similar to SplitIdentifierString, except that the parsing * rules are meant to handle pathnames instead of identifiers: there is |