pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_locale.h: define case mapping limits.
Date: Mon, 24 Aug 2026 21:41:49 +0000
Message-ID: <E1wycQO-00000001xdH-165V@gemulon.postgresql.org> (raw)

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@iki.fi>
Reviewed-by: Rithvika Devisetti <devisettirithvika@gmail.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(-)



Message-ID: <E1wycQO-00000001xdH-165V@gemulon.postgresql.org>
Permalink:  ../E1wycQO-00000001xdH-165V@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wycQO-00000001xdH-165V@gemulon.postgresql.org

 · 

reply

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: pg_locale.h: define case mapping limits.
  In-Reply-To: <E1wycQO-00000001xdH-165V@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