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: Fix INITCAP() word boundaries for PG_UNICODE_FAST.
Date: Mon, 21 Apr 2025 19:35:39 +0000
Message-ID: <E1u6wvb-0019RV-0H@gemulon.postgresql.org> (raw)

Fix INITCAP() word boundaries for PG_UNICODE_FAST.

Word boundaries are based on whether a character is alphanumeric or
not. For the PG_UNICODE_FAST collation, alphanumeric includes
non-ASCII digits; whereas for the PG_C_UTF8 collation, it only
includes digits 0-9. Pass down the right information from the
pg_locale_t into initcap_wbnext to differentiate the behavior.

Reported-by: Noah Misch <noah@leadboat.com>
Reviewed-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/20250417135841.33.nmisch@google.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/90260e2ec6bbfc3dfa9d9501ab75c535de52f677

Modified Files
--------------
src/backend/utils/adt/pg_locale_builtin.c  |  4 +++-
src/common/unicode/case_test.c             | 13 ++++++++++++-
src/test/regress/expected/collate.utf8.out |  8 ++++++--
src/test/regress/sql/collate.utf8.sql      |  2 ++
4 files changed, 23 insertions(+), 4 deletions(-)



Message-ID: <E1u6wvb-0019RV-0H@gemulon.postgresql.org>
Permalink:  ../E1u6wvb-0019RV-0H@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1u6wvb-0019RV-0H@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: Fix INITCAP() word boundaries for PG_UNICODE_FAST.
  In-Reply-To: <E1u6wvb-0019RV-0H@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