From 19c2d1d413d7842e6c90c237fab33fe0f93caf82 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Mon, 12 Jan 2026 09:11:56 -0800 Subject: [PATCH v1 3/4] dict_xsyn: use CASEFOLD() rather than LOWER(). CASEFOLD is better for case-insensitive matching in edge cases. --- contrib/dict_xsyn/dict_xsyn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/dict_xsyn/dict_xsyn.c b/contrib/dict_xsyn/dict_xsyn.c index 5c4917ce1fc..613527fd392 100644 --- a/contrib/dict_xsyn/dict_xsyn.c +++ b/contrib/dict_xsyn/dict_xsyn.c @@ -98,7 +98,7 @@ read_dictionary(DictSyn *d, const char *filename) if (*line == '\0') continue; - value = str_tolower(line, strlen(line), DEFAULT_COLLATION_OID); + value = str_casefold(line, strlen(line), DEFAULT_COLLATION_OID); pfree(line); pos = value; @@ -215,7 +215,7 @@ dxsyn_lexize(PG_FUNCTION_ARGS) { char *temp = pnstrdup(in, length); - word.key = str_tolower(temp, length, DEFAULT_COLLATION_OID); + word.key = str_casefold(temp, length, DEFAULT_COLLATION_OID); pfree(temp); word.value = NULL; } -- 2.43.0