From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add SQL function CASEFOLD().
Date: Fri, 24 Jan 2025 22:59:27 +0000
Message-ID: <E1tbSe7-003LG0-6w@gemulon.postgresql.org> (raw)
Add SQL function CASEFOLD().
Useful for caseless matching. Similar to LOWER(), but avoids edge-case
problems with using LOWER() for caseless matching.
For collations that support it, CASEFOLD() handles characters with
more than two case variations or multi-character case variations. Some
characters may fold to uppercase. The results of case folding are also
more stable across Unicode versions than LOWER() or UPPER().
Discussion: https://postgr.es/m/a1886ddfcd8f60cb3e905c93009b646b4cfb74c5.camel%40j-davis.com
Reviewed-by: Ian Lawrence Barwick
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/bfc5992069cf00b189af83d96a83ae5ebb65e938
Modified Files
--------------
doc/src/sgml/func.sgml | 46 ++++++++++++++++-
src/backend/utils/adt/formatting.c | 69 ++++++++++++++++++++++++++
src/backend/utils/adt/oracle_compat.c | 16 ++++++
src/backend/utils/adt/pg_locale.c | 24 +++++++++
src/backend/utils/adt/pg_locale_builtin.c | 10 ++++
src/backend/utils/adt/pg_locale_icu.c | 58 ++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 3 ++
src/include/utils/formatting.h | 1 +
src/include/utils/pg_locale.h | 3 ++
src/test/regress/expected/collate.icu.utf8.out | 24 +++++++++
src/test/regress/expected/collate.utf8.out | 14 ++++++
src/test/regress/sql/collate.icu.utf8.sql | 5 ++
src/test/regress/sql/collate.utf8.sql | 6 +++
14 files changed, 278 insertions(+), 3 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add SQL function CASEFOLD().
In-Reply-To: <E1tbSe7-003LG0-6w@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox