Re: Speed up ICU case conversion by using ucasemap_utf8To*() - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: Speed up ICU case conversion by using ucasemap_utf8To*()
Date
Msg-id AF5F542C-3703-45C4-B590-F02D00BFC809@proxel.se
Whole thread Raw
In response to Re: Speed up ICU case conversion by using ucasemap_utf8To*()  (Andreas Karlsson <andreas@proxel.se>)
List pgsql-hackers
On 1 April 2026 02:46:23 CEST, Andreas Karlsson <andreas@proxel.se> wrote:
>My proposed fix is that we allocate a ULOC_LANG_CAPACITY buffer for the language like we do in fix_icu_locale_str()
insteadof trying to be clever. An alternative would be to use strncmp("tr", lang, 3) but that seems too clever for my
tastein something which is not performance critical. A third option would be to check for
U_STRING_NOT_TERMINATED_WARNINGbut I think that would just be unnecessarily convoluted code. 
>
>I have attached my proposed fix.

Since it is likely I introduced or at least exposed this bug somehow I am adding this to the open items for PG 19.

Andreas



pgsql-hackers by date:

Previous
From: Alexandre Felipe
Date:
Subject: Re: SLOPE - Planner optimizations on monotonic expressions.
Next
From: Yugo Nagata
Date:
Subject: Re: Warn when creating or enabling a subscription with max_logical_replication_workers = 0