pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove separate locale_is_c arguments
Date: Fri, 13 Sep 2024 14:30:19 +0000
Message-ID: <E1sp7JS-000wBm-Sq@gemulon.postgresql.org> (raw)

Remove separate locale_is_c arguments

Since e9931bfb751, ctype_is_c is part of pg_locale_t.  Some functions
passed a pg_locale_t and a bool argument separately.  This can now be
combined into one argument.

Since some callers call MatchText() with locale 0, it is a bit
confusing whether this is all correct.  But it is the case that only
callers that pass a non-zero locale object to MatchText() end up
checking locale->ctype_is_c.  To make that flow a bit more
understandable, add the locale argument to MATCH_LOWER() and GETCHAR()
in like_match.c, instead of implicitly taking it from the outer scope.

Reviewed-by: Jeff Davis <pgsql@j-davis.com>
Discussion: https://www.postgresql.org/message-id/84d415fc-6780-419e-b16c-61a0ca819e2b@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/433d8f40e957c042d7d224e4561ca033252baf37

Modified Files
--------------
src/backend/utils/adt/like.c       | 30 +++++++++++++++---------------
src/backend/utils/adt/like_match.c | 20 +++++++++-----------
2 files changed, 24 insertions(+), 26 deletions(-)



Message-ID: <E1sp7JS-000wBm-Sq@gemulon.postgresql.org>
Permalink:  ../E1sp7JS-000wBm-Sq@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sp7JS-000wBm-Sq@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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove separate locale_is_c arguments
  In-Reply-To: <E1sp7JS-000wBm-Sq@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