pgsql: Control ctype behavior internally with a method table.

From: Jeff Davis <jdavis(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Control ctype behavior internally with a method table.
Date: 2025-07-01 14:51:39
Message-ID: E1uWcKh-004CYm-0l@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Control ctype behavior internally with a method table.

Previously, pattern matching and case mapping behavior branched based
on the provider. Refactor to use a method table, which is less
error-prone.

This is also a step toward multiple provider versions, which we may
want to support in the future.

Reviewed-by: Andreas Karlsson <andreas(at)proxel(dot)se>
Reviewed-by: Peter Eisentraut <peter(at)eisentraut(dot)org>
Discussion: https://postgr.es/m/2830211e1b6e6a2e26d845780b03e125281ea17b.camel%40j-davis.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5a38104b364234615c780656a8b2424f96ed9efa

Modified Files
--------------
src/backend/regex/regc_pg_locale.c | 429 ++++++------------------------
src/backend/utils/adt/like.c | 22 +-
src/backend/utils/adt/like_support.c | 7 +-
src/backend/utils/adt/pg_locale.c | 121 +++------
src/backend/utils/adt/pg_locale_builtin.c | 111 +++++++-
src/backend/utils/adt/pg_locale_icu.c | 119 ++++++++-
src/backend/utils/adt/pg_locale_libc.c | 331 ++++++++++++++++++++---
src/include/utils/pg_locale.h | 53 ++++
src/tools/pgindent/typedefs.list | 1 -
9 files changed, 686 insertions(+), 508 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2025-07-01 15:37:52 pgsql: Document age(xid) and mxid_age(xid).
Previous Message Jeff Davis 2025-07-01 14:25:34 pgsql: Use pg_ascii_tolower()/pg_ascii_toupper() where appropriate.