Re: Use CASEFOLD() internally rather than LOWER()

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Jeff Davis" <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Use CASEFOLD() internally rather than LOWER()
Date: 2026-02-28 13:27:12
Message-ID: f4aefa40-a25e-413f-a7be-66e4455c0337@manitou-mail.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis wrote:

> There are a number of internal callers of LOWER(), and conceptually
> those should all be using CASEFOLD(). Patches attached.

I tried 0001 with a non-UTF8 database and got quickly stuck:

create database latin9 encoding='LATIN9'
template=template0
locale='fr_FR(dot)ISO-8859-15(at)euro';

\c latin9

select 'abc' ilike 'bc';
ERROR: Unicode case folding can only be performed if server encoding is UTF8

Presumably the internal calls to casefold should be conditionalized
on the encoding being UTF-8?

Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2026-02-28 14:07:14 Re: Skipping schema changes in publication
Previous Message Amit Kapila 2026-02-28 11:57:16 Re: Skipping schema changes in publication