Re: Speed up ICU case conversion by using ucasemap_utf8To*()

Andreas Karlsson <andreas@proxel.se>

From: Andreas Karlsson <andreas@proxel.se>
To: Jeff Davis <pgsql@j-davis.com>, Alexander Lakhin <exclusion@gmail.com>, zengman <zengman@halodbtech.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-04-14T00:20:25Z
Lists: pgsql-hackers

Attachments

On 4/13/26 20:40, Jeff Davis wrote:
> Thank you both!

Thanks!

> Committed with minor revisions:
> 
> * also check the status code, just to be sure

If we do that shouldn't we also do the same in the other callsites in 
initdb.c uloc_getLanguage()? Maybe something like the attached. Also I 
wonder if maybe other ICU functions have the same risk.

Andreas

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Check for unterminated strings when calling uloc_getLanguage().

  2. Fix overrun when comparing with unterminated ICU language string.

  3. ICU: use UTF8-optimized case conversion API