diff options
author | Jeff Davis <jdavis@postgresql.org> | 2024-10-11 16:58:22 -0700 |
---|---|---|
committer | Jeff Davis <jdavis@postgresql.org> | 2024-10-11 16:59:10 -0700 |
commit | ff33df26c2446107a20e3432b4c73850536678b9 (patch) | |
tree | ecb449b3c7891d943df333a7ab0206f654f0a010 | |
parent | 912d15cba50c257f2195f79d3f80bad26996c018 (diff) | |
download | postgresql-ff33df26c2446107a20e3432b4c73850536678b9.tar.gz postgresql-ff33df26c2446107a20e3432b4c73850536678b9.zip |
Fix missed case for builtin collation provider.
A missed check for the builtin collation provider could result in
falling through to call isalpha().
This does not appear to have practical consequences because it only
happens for characters in the ASCII range. Regardless, the builtin
provider should not be calling libc functions, so backpatch.
Discussion: https://postgr.es/m/1bd5a0a5192f82c22ee7527e825b18ab0028b2c7.camel@j-davis.com
Backpatch-through: 17
-rw-r--r-- | src/backend/utils/adt/like_support.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/like_support.c b/src/backend/utils/adt/like_support.c index 2635050861f..6cd21ba8fed 100644 --- a/src/backend/utils/adt/like_support.c +++ b/src/backend/utils/adt/like_support.c @@ -1505,7 +1505,7 @@ pattern_char_isalpha(char c, bool is_multibyte, return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); else if (is_multibyte && IS_HIGHBIT_SET(c)) return true; - else if (locale && locale->provider == COLLPROVIDER_ICU) + else if (locale && locale->provider != COLLPROVIDER_LIBC) return IS_HIGHBIT_SET(c) || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); else if (locale && locale->provider == COLLPROVIDER_LIBC) |