Hi, On 2026-08-11 12:41:49 +0300, Heikki Linnakangas wrote: > On 11/08/2026 12:19, Heikki Linnakangas wrote: > > I think the best fix is to make pg_strupper() in REL_18_STABLE also work > > with the C locale. It's an accident waiting to happen if it doesn't. > > (And same for all the other pg_str*() functions, of course) > > Like the attached. > > There's some code duplication: the strupper_c() function is essentially the > same as asc_toupper(), and str_toupper() wouldn't really need to have the > special case for C locale anymore, it could just rely on pg_strupper() now. > But that's so in 'master' too, so I think cleaning that up should be left > for a separate patch.
I wonder if we also ought to do something about the other uses of pg_locale_t->info.lt in pg_locale_libc.c? That's at least strncoll_libc(), strnxfrm_libc(). I think all the in-core callers guard them, but the protection seems mighty far away in some cases. Greetings, Andres Freund
