($INBOX_DIR/description missing)
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: [email protected]
Subject: pgsql: Fix LIKE matching with nondeterministic collations and backslash
Date: Mon, 06 Jul 2026 18:48:15 +0000
Message-ID: <[email protected]> (raw)
Fix LIKE matching with nondeterministic collations and backslashes.
Commit 85b7efa1c added support for LIKE with nondeterministic
collations, but it included a bug in the de-escaping logic for
literal pattern substrings. That unconditionally skipped all
backslashes, but when it encounters '\\' it should emit the second
backslash as a de-escaped character. That led to acting as though
the escaped backslash was not there.
Bug: #19474
Reported-by: Bowen Shi <[email protected]>
Author: Nitin Motiani <[email protected]>
Reviewed-by: Zsolt Parragi <[email protected]>
Reviewed-by: Ewan Young <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Discussion: https://postgr.es/m/CAH5HC94yU+K8Gcdy12M5BS8gwD_SXLSHzc9k5tNk7JDnpBiFMA@mail.gmail.com
Backpatch-through: 18
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d6ffcae32a10bd9b53fcfe7be507ba00c6083acc
Modified Files
--------------
src/backend/utils/adt/like_match.c | 5 ++---
src/test/regress/expected/collate.icu.utf8.out | 31 ++++++++++++++++++++++++++
src/test/regress/sql/collate.icu.utf8.sql | 7 ++++++
3 files changed, 40 insertions(+), 3 deletions(-)
view thread (3+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pgsql: Fix LIKE matching with nondeterministic collations and backslash
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox