Re: Add CASEFOLD() function.

Joe Conway <mail@joeconway.com>

From: Joe Conway <mail@joeconway.com>
To: Jeff Davis <pgsql@j-davis.com>, Ian Lawrence Barwick <barwick@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2024-12-12T18:55:00Z
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.

On 12/12/24 13:30, Jeff Davis wrote:
> On Thu, 2024-12-12 at 21:52 +0900, Ian Lawrence Barwick wrote:
>> and it seems to work as advertised, except the function is named
>> "FOLDCASE()"
>> in the patch, so I'm wondering which is intended?
> 
> Thank you for looking into this, I went back and forth on the name, and
> mistyped it a few times.
> 
> ICU seems to use "foldcase":
> 
> https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/ucasemap_8h.html
> 
> and it seems to be slightly more proper grammatically (with "fold"
> being the verb). However, "case folding" is common terminology in
> Postgres and Unicode, so "casefold" can be seen as the verb instead.
> 
> I don't have a strong opinion here so I will just go with whatever
> seems like the popular choice.


FWIW I prefer casefold()

-- 
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com