pgsql: Allow length=-1 for NUL-terminated input to pg_strncoll(), etc.

From: Jeff Davis <jdavis(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Allow length=-1 for NUL-terminated input to pg_strncoll(), etc.
Date: 2024-09-24 22:18:49
Message-ID: E1stDrs-000kcE-QU@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow length=-1 for NUL-terminated input to pg_strncoll(), etc.

Like ICU, allow a length of -1 to be specified for NUL-terminated
arguments to pg_strncoll(), pg_strnxfrm(), and pg_strnxfrm_prefix().

Simplifies the code and comments.

Discussion: https://postgr.es/m/2d758e07dff26bcc7cbe2aec57431329bfe3679a.camel@j-davis.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ac30021356e7aa05a069741d17c3db3e8d520933

Modified Files
--------------
src/backend/utils/adt/pg_locale.c | 269 ++++++++++++++++----------------------
src/include/utils/pg_locale.h | 8 +-
2 files changed, 114 insertions(+), 163 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2024-09-24 22:27:58 pgsql: Fix data loss at inplace update after heap_update().
Previous Message Tom Lane 2024-09-24 21:21:42 pgsql: Fix psql describe commands' handling of ACL columns for old serv