Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wVShH-001ypn-3A for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Jun 2026 11:26:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wVShG-00BxY4-2p for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Jun 2026 11:26:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wVShG-00BxXq-1v for pgsql-hackers@lists.postgresql.org; Fri, 05 Jun 2026 11:26:42 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wVShE-00000001EB3-46cY for pgsql-hackers@lists.postgresql.org; Fri, 05 Jun 2026 11:26:41 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5aa7a7ad4d3so1467741e87.1 for ; Fri, 05 Jun 2026 04:26:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780658799; cv=none; d=google.com; s=arc-20240605; b=jpeCUj9zY6fM3c1ANAtn9C4crlf7PbKmyzp8RM38NHIKn86fOLfaWTKlbOmAF6O9hr l97wRqJKbTdcASNCbehh7FSShklf2AiAr0LebN61zCvvmop0xVHIjx226wvWM1+eyLQb X44sUtnWWZTFQZoXyai80P6JPYir+uClrqo0VJO+EexlJFl6Iel5OODUEfNpWvOxd+N4 VTJna2ERBwGDKW3GR5SYToj5G2F04BYTxcflZmwYXoVfL6C746qAzhLgTQQyc5vbJjZN gbOAT2xSLM3EDZH/N0jclS2U1KB/ChPEXhxcTU8zkdumBUJzvpFwCF6CxhoG7sDNbRUT 8AJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ehfyTovqxoTDGxrHeBIAx7gj9dynpSTjgmcWWa/HgyI=; fh=ubyMxsixd1WkLGiq0Op44rrWgkMSeDcu4vly27fO8xY=; b=NhIRHrqFqXGyJhl22bvlUgV6RD4+cXnOChTAop9jRUoPPaQTarHo7FDFyI2Z0b/hYP pL4ZAotuyGKWa08KeF3F4G9dHV4tpmaShborWzPrdgQ7tp8W2lwRU8I4IwZ6JeQ2GWwJ cStDTlTdeSUu1iepIhDeRdBN20lnyXhnP2WdCcwfk5tk+JKdG7ormjaZgtSutwymq9MA Y/XRM547kNIPYMq2Q3KrobB0zEwaW0EN8JjjNZYG0TZj8OeTHoH2lNp8grYQAyZRxWYK VuvG11kjnPT6R7/8IntZmBv4r7ccn4KKjFsA+3V01ZAr3rkWq75c7ShiCaumR4pnZJC0 CQUQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780658799; x=1781263599; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ehfyTovqxoTDGxrHeBIAx7gj9dynpSTjgmcWWa/HgyI=; b=FrgRa6saU1GPLu0Z4eTUT4+oi58TcDhkVL4m1Rvq7oNfOS3gEPwP9crQHuL3YOD0zs CcJucgL59kKG2JWlY48AP1TeQIaPsWaBhMXY4hHPqv2YuYsr4US1MozX8+plUuPjxyC4 TQCNHWKSxorUykOG0H+1lusKaBKatB5ZewYrzufe6z/br5JC5TRLO+LQmvuvok6Dalh8 mYuV9gdh5Mm/do9/3I28GE4zIZ1z9CugS9TvxxfXZxA+KQmJFbBvzEOdk5HB+HdXERcV Oo0rBIJiMAsLcU6iDb9XQW4mIzJxYFq4sllUgLPG8bwSYQQlBepHa81PDlaIOPFZhrSE hn5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780658799; x=1781263599; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ehfyTovqxoTDGxrHeBIAx7gj9dynpSTjgmcWWa/HgyI=; b=bx8RIUYgFjhcud1yaw9b0mg5IJk9Tc0kFNEnRDtnPeLSSEYJR2V/MpHNRfXTnDNilu C10bhiyoBW2a9+zVZJ4LZOY5zgiyJkpg+shrTMcXyAvmDOyPUCC9m7UQovzOjVtlgFON 3DUxJzBB0HoMlvB2qXmMCPhtQR0jnk4rFYZ4ibj7xtFkH4Tzaa99s6YHG+vNXKJS7ye5 rXuDdDGDoYH9f1wwQr0lvaUUhQZyFiHETeBsD3y1nnP3cLhza/OiG+hBqpC9ccQiNxXF QkFMKYxq9idXoUpMt4AaN3x9RcMs7zaD0wt+5XMwHVIqw31q8FIoWEXWlMnJRLjLEyfB XVew== X-Forwarded-Encrypted: i=1; AFNElJ/r766jvEF9UYivVnsOTsbFdit3K41d7gMHD8YIySjB3ejWwwkVaajjMNHsO+Lnqbqe9e0UcQy2t2WTxzzp@lists.postgresql.org X-Gm-Message-State: AOJu0YzUnvss/h8S7t+enwHn6U7dvkYq9I9++bCsmcShTfHsmjESiZtR a5cSf+/GCcpXbJvMb52Vq/QoG1wM1mzLqIPBR7eemMQ+Z5SrtKHzwMcVi5nwFdKaoOtuxPrwaEj oFV+fCby8lGkxJGakiVo6HhoZIldz99M= X-Gm-Gg: Acq92OHMabKn0EWsDMZEXoX295dJ2XkWGqYXzqKatSIqLBPl1Y2eESlb20xXwC3nAkj MfraxmJ9fWUzBim1iFtk2fuWfDDf/YEzmbUfCdXYIzu4D5qEOOUGNAlmD2TZA/Eih7uYiIK/B1F 9rPaK4Olt1wcBXxENrfrwQTXiqCppGTfEcb8THeeKD2zh9WyClPfKLGisr5Ki6MzcEozO+4XQHB m15ms2rfcobmvxstMTpP3J/RJDsqyHabGL+M9ugqeBvDWuzkwMS6s3W5PshnEjLdjBigYycKiyV nVBuzJkxC6J3J8JV4qXSg4zZGNmbivmsgKKj X-Received: by 2002:a05:6512:39cd:b0:5a2:b43d:ac47 with SMTP id 2adb3069b0e04-5aa87b40d15mr1024536e87.5.1780658799090; Fri, 05 Jun 2026 04:26:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ewan Young Date: Fri, 5 Jun 2026 19:26:26 +0800 X-Gm-Features: AVVi8Ccw_nuvCnBK71HIzom3gtSpF9lqOjtLodhgho5VWur1Wt-HNMQh3vfQiRU Message-ID: Subject: Re: [PATCH] Fix for bug #19474: LIKE fails to match literal backslashes with nondeterministic collations To: Nitin Motiani Cc: Zsolt Parragi , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I reviewed the v2 patch. The patch applies cleanly on the current master (4cb2a9863d8). I built with --enable-cassert and ICU, and confirmed that the three backslash test cases give wrong results on unpatched master and the expected results with the patch applied. The full regression suite passes (245/245), including the updated collate.icu.utf8 test. Two comments: 1. The commit message describes the symptom as "an incorrect match failure", but the bug also causes incorrect matches in the other direction. Since the unescaping logic dropped the literal backslash from the pattern, a text *without* a backslash could wrongly match a pattern that requires one: SELECT 'backslash' COLLATE ignore_accents LIKE 'back\\slash%'; -- unpatched: t (wrong), patched: f (correct) I think it's worth mentioning this false-positive side of the bug in the commit message, since silently-too-permissive LIKE filters are arguably the more dangerous symptom for applications. 2. A small typo in the new comment in like_match.c: "occurences" should be "occurrences". Best regards On Fri, Jun 5, 2026 at 7:21=E2=80=AFPM Nitin Motiani wrote: > > Hi, > > I have created a commitfest entry for this patch here > https://commitfest.postgresql.org/patch/6844/. Please take a look. > > Thanks, > Nitin Motiani > Google > > > >