Re: Add CASEFOLD() function.

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Peter Eisentraut <peter@eisentraut.org>, Joe Conway <mail@joeconway.com>, Ian Lawrence Barwick <barwick@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2025-01-23T19:28:58Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix PDF doc build.

  2. Add SQL function CASEFOLD().

  3. Add support for Unicode case folding.

Attachments

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