| From: | Jeff Davis <jdavis(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: pg_locale.h: define case mapping limits. |
| Date: | 2026-08-24 21:41:49 |
| Message-ID: | E1wycQO-00000001xdH-165V@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
pg_locale.h: define case mapping limits.
Clearly define case mapping upper bounds that cover all providers,
locales, and encodings: PG_MAX_CASEMAP_MBCHARS,
PG_MAX_CASEMAP_EXPANSION, and PG_CASEMAP_BUFSZ.
Also redefine UTF8_CASEMAP_BUFSZ to include room for a NUL for
consistency with PG_CASEMAP_BUFSZ.
Use PG_CASEMAP_BUFSZ for the static buffer in ltree/crc32.c.
Remove macros UNICODE_CASEMAP_LEN (which was redundant with
UNICODE_MAX_CASEMAP_CODEPOINTS from unicode_limits.h), and
UNICODE_CASEMAP_BUFSZ which was not as descriptive or helpful.
Suggested-by: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Reviewed-by: Rithvika Devisetti <devisettirithvika(at)gmail(dot)com>
Discussion: https://postgr.es/m/2cfbc37ae8deccd3825e36b7f31c391cbf8ff9b8.camel@j-davis.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1e9b06a8e07c3bd394459e68902b79d7b55c2035
Modified Files
--------------
contrib/ltree/crc32.c | 2 +-
src/backend/utils/adt/pg_locale.c | 44 ++++++++++++++++++-----
src/common/unicode/generate-unicode_case_table.pl | 4 +--
src/include/common/unicode_limits.h | 4 +--
src/include/utils/pg_locale.h | 35 +++++++++++++-----
5 files changed, 67 insertions(+), 22 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2026-08-24 22:43:01 | pgsql: Align random test function parameters in test_bitmapset |
| Previous Message | Nathan Bossart | 2026-08-24 21:28:43 | pgsql: Fix autovacuum's handling of TOAST storage parameters. |