| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Cc: | "Masashi Kamura (Fujitsu)" <kamura(dot)masashi(at)fujitsu(dot)com>, "'pgsql-hackers(at)lists(dot)postgresql(dot)org'" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com> |
| Subject: | Re: Crash issue in PG18.5 regression |
| Date: | 2026-08-11 10:23:03 |
| Message-ID: | anr2M1Wj_31k6aPD@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2026-Aug-11, 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.
Hm, this looks really similar to what I wrote (attached here for the
curious), except you chose a different layer (directly in pg_locale.c,
whereas I put mine under the libc implementation). Probably yours is
the better choice since it also covers the builtin provider.
> 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.
Agreed.
It's unclear to me how to get the strtitle() thing called, since the
only caller seems to be str_initcap() which will use asc_initcap anyway.
Maybe such a cleanup should remove some part of this code.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Hardcode-str-lower-upper-title-for-the-C-locale.patch | text/x-diff | 4.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Álvaro Herrera | 2026-08-11 10:25:58 | Re: Stale comments for the tuple_update/tuple_delete options parameter |
| Previous Message | Etsuro Fujita | 2026-08-11 10:15:49 | Re: use of SPI by postgresImportForeignStatistics |