Add CASEFOLD() function.
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: pgsql-hackers@postgresql.org
Date: 2024-12-12T09:00:15Z
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 →
-
Fix PDF doc build.
- d2ca16bb509c 18.0 landed
-
Add SQL function CASEFOLD().
- bfc5992069cf 18.0 landed
-
Add support for Unicode case folding.
- 4e7f62bc386a 18.0 landed
Attachments
- v1-0001-Refactor-case-mapping-into-provider-specific-file.patch (text/x-patch) patch v1-0001
- v1-0002-Add-support-for-Unicode-case-folding.patch (text/x-patch) patch v1-0002
- v1-0003-Add-SQL-function-FOLDCASE.patch (text/x-patch) patch v1-0003
Unicode case folding is a way to convert a string to a canonical case for the purpose of case-insensitive matching. Users have long used LOWER() for that purpose, but there are a few edge case problems: * Some characters have more than two cased forms, such as "Σ" (U+03A3), which can be lowercased as "σ" (U+03C3) or "ς" (U+03C2). The CASEFOLD() function converts all cased forms of the character to "σ". * The character "İ" (U+0130, capital I with dot) is lowercased to "i", which can be a problem in locales that don't expect that. * If new lower case characters are added to Unicode, the results of LOWER() may change. The CASEFOLD() function solves these problems. Patch attached. -- Jeff Davis PostgreSQL Contributor Team - AWS