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: Use multibyte-aware extraction of pattern prefixes.
Date: Mon, 15 Dec 2025 18:26:50 +0000
Message-ID: <E1vVDHV-000wjh-2T@gemulon.postgresql.org> (raw)

Use multibyte-aware extraction of pattern prefixes.

Previously, like_fixed_prefix() used char-at-a-time logic, which
forced it to be too conservative for case-insensitive matching.

Introduce like_fixed_prefix_ci(), and use that for case-insensitive
pattern prefixes. It uses multibyte and locale-aware logic, along with
the new pg_iswcased() API introduced in 630706ced0.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/450ceb6260cad30d7afdf155d991a9caafee7c0d.camel@j-davis.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9c8de1596912b36a8b22d880766ac660b66d03c7

Modified Files
--------------
src/backend/utils/adt/like_support.c | 169 +++++++++++++++++++++++------------
1 file changed, 112 insertions(+), 57 deletions(-)



Message-ID: <E1vVDHV-000wjh-2T@gemulon.postgresql.org>
Permalink:  ../E1vVDHV-000wjh-2T@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vVDHV-000wjh-2T@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: Use multibyte-aware extraction of pattern prefixes.
  In-Reply-To: <E1vVDHV-000wjh-2T@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