From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Introduce t_isalnum() to replace t_isalpha() || t_isdigit() test
Date: Thu, 06 Oct 2022 15:18:50 +0000
Message-ID: <E1ogSe9-001AsS-DB@gemulon.postgresql.org> (raw)
Introduce t_isalnum() to replace t_isalpha() || t_isdigit() tests.
ts_locale.c omitted support for "isalnum" tests, perhaps on the
grounds that there were initially no use-cases for that. However,
both ltree and pg_trgm need such tests, and we do also have one
use-case now in the core backend. The workaround of testing
isalpha and isdigit separately seems quite inefficient, especially
when dealing with multibyte characters; so let's fill in the
missing support.
Discussion: https://postgr.es/m/2548310.1664999615@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ca71131eebba63809ceb86be033a264a5f0a1d79
Modified Files
--------------
contrib/ltree/ltree.h | 2 +-
contrib/pg_trgm/trgm.h | 2 +-
src/backend/tsearch/ts_locale.c | 16 ++++++++++++++++
src/backend/utils/adt/tsquery.c | 2 +-
src/include/tsearch/ts_locale.h | 1 +
5 files changed, 20 insertions(+), 3 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Introduce t_isalnum() to replace t_isalpha() || t_isdigit() test
In-Reply-To: <E1ogSe9-001AsS-DB@gemulon.postgresql.org>
References: <E1ogSe9-001AsS-DB@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