Re: Add CASEFOLD() function.

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, Joe Conway <mail(at)joeconway(dot)com>, Ian Lawrence Barwick <barwick(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add CASEFOLD() function.
Date: 2025-01-23 19:28:58
Message-ID: f2994201f4ea5f171d889024cfc55399eeb245c7.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2025-01-17 at 16:34 -0800, Jeff Davis wrote:
> v5 attached.

v6 attached. I plan to commit this soon.

A couple things to note:

* The ICU API for lower/title/uppercasing is slightly different from
folding. The former accept a locale, while the latter just has an
option which is relevant only to languages 'az' and 'tr'. So the patch
checks for those two languages to enable the option, so that ICU is
consistently locale-aware for all the functions. I also added ICU
tests.

* I'm leaving out the normalization, which is not required for Unicode
Default Caseless Matchinng, as mentioned in the last email. That
simplifies the SQL function as well as the implementation. There was
some discussion on normalization upthread.

Regards,
Jeff Davis

Attachment Content-Type Size
v6-0001-Add-SQL-function-CASEFOLD.patch text/x-patch 18.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-01-23 19:55:25 Re: Orphaned users in PG16 and above can only be managed by Superusers
Previous Message Robert Haas 2025-01-23 19:22:25 Re: Eagerly scan all-visible pages to amortize aggressive vacuum