pgsql: pg_locale.c: Fix REL_18_STABLE for srclen < 0.

From: Jeff Davis <jdavis(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_locale.c: Fix REL_18_STABLE for srclen < 0.
Date: 2026-08-18 01:06:34
Message-ID: E1ww8Hh-00000000zTI-3ZhK@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_locale.c: Fix REL_18_STABLE for srclen < 0.

Ensure that srclen >= 0 before calling strlower_c(), etc.

Commit 5f003855e7 backported strlower_c(), etc., to 18, but did not
account for the srclen < 0 behavior that existed in 18 (and was
removed later in version 19 with commit 6d22c67c3b).

No callers in core use the srclen < 0 behavior, but it's possible
(though unlikely) that extensions do.

This applies to REL_18_STABLE only.

Discussion: https://postgr.es/m/v36ssaygf7grb3qzfsjhtdzi7kqd45ds56nyuf7gi5qjml4qbb@ezmfqzmhlrs2

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/27e2afb492cd553093c92ea917d24651b5a9ae16

Modified Files
--------------
src/backend/utils/adt/pg_locale.c | 8 ++++++++
1 file changed, 8 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Langote 2026-08-18 03:41:47 pgsql: Fix cross-type foreign keys in the batched fast-path FK check
Previous Message Tom Lane 2026-08-17 22:18:09 pgsql: Tighten up tsqueryrecv().