From: | Jeff Davis <jdavis(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add SQL function CASEFOLD(). |
Date: | 2025-01-24 22:59:27 |
Message-ID: | E1tbSe7-003LG0-6w@gemulon.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2025-01-25 01:17:17 | pgsql: Use the correct sizeof() in BufFileLoadBuffer |
Previous Message | Andres Freund | 2025-01-24 22:42:08 | pgsql: postmaster: Commonalize FatalError paths |