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 1wWUuA-002env-2S for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2026 08:00:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wWUu9-001E4B-1l for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2026 08:00:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wWUu9-001E43-0s for pgsql-hackers@lists.postgresql.org; Mon, 08 Jun 2026 08:00:17 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wWUu7-00000001u2p-05tu for pgsql-hackers@lists.postgresql.org; Mon, 08 Jun 2026 08:00:16 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5aa88b4f792so2816761e87.1 for ; Mon, 08 Jun 2026 01:00:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780905614; cv=none; d=google.com; s=arc-20240605; b=R8Kqxup8ZjJsLpxCKtZDNjbeDg3VZiGEFanxjCi9WIu60LoVvRBrqlCLmwAxkYhDQd 3bPBOS+NJu/ZcBr3wx/34zR0hlbuefOUZ6sCAG77ipOkpquxNrK5xq8cyJO2jp8EtKzU 5br6VCL94Ja+ZAburBR/5t9s7/HabrsqhV1dk9lXhlwfD/ULpx/94i4Y+6/E09YN9LIP CvtO53T/w6/MmfiawdwCS7MVNNrB1rTsYQ9hXj2KvZnNb22yfr+gvclgo00P49S2WAcr I9xm9y4O/1AvM4aTtPk4CfQOfSAgykueiU3wBcSytTI5q+EvNpnuIJ1Qnnxy5KGc7I3P y/zg== 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=sfX/YPmxShO4M3CzgN/NQQB0NJ4hqzhv0y0avyrUHkE=; fh=eY5fMyZIdSgKZVgYyyQ8Z5i5rpUMsBCtzg/u624sRjw=; b=daRUHv4dAV/TWlQxl4JnlIE5xCZJOma0ZHHQJwrIDHHsmDLtfqsKMzS/YXdb3G/xqH n0obskPQVZ/GYOD1A32EyO1kdKrRoNMg12ZW2WCyCSTAmUYswJS3po3Zx5AlbFUmGrMZ 9QthZA3AiesegbQQV41wnVXdZJMko+eIHyt5dBctNKEdrHFIQaQVvuptMU6Cj+9lH0L2 3Ku3LEV3XQh8w5wXJpyG2BDrbfCunlETqOq+l6Xyujm/D1ZEUqqqhUrLHHIBYF7Fi95j jbL2E66UWoVq04lKt28BuCzVpL50LoYwwA/1r1dmWTjYDxfYJJmhKqz11CbzSxgsxSGP urHg==; 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=1780905614; x=1781510414; 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=sfX/YPmxShO4M3CzgN/NQQB0NJ4hqzhv0y0avyrUHkE=; b=gODCGFOKnlAMTfHnk0moCRusoqaeiKOU/IIFIbJ9JcoMIKG/kAQn8uy0/dZn+DxeU0 sEt1Q0oMSvgeZuv3Yy0KDs1GLbhbh5DSdpIpSxXtL4tIhsq2E4l6YJ+PuXm2N1nzw0w3 SkYyQrroqbMXf+7JRESj4OdCS+U6KTUEVb+w7gnTR/hEMsr2DasvsCSJSGEhiC+zBzg5 ifMP62v9YajvozSuoiDGRuRXR2OfqcVJ6zPWeUmKstDuCIGyNaqSTkG6f0y0Ypv4KZsh l/khOY5j2RCPqCc6mrkTb2/0mx+nP/QDCZD+0KqAY6Fe0yIJ8iYY3wtOc81E5hP9XzUk DFfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780905614; x=1781510414; 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=sfX/YPmxShO4M3CzgN/NQQB0NJ4hqzhv0y0avyrUHkE=; b=q0KIhcpa0255azM9qH1aelWdVgTipTuU0cuKtCaCHbXTjdoPRP0YHoDqsnkcP/C3fp 12AzKBfUN6iTIvDXVbnMs35av4tDvgkzlcCF1TYK0F9/Z2GY87+LnQW5cy43OBopNDTD +hTwZryZQ1mPBIY3Q4AB5rs8+SUJ3wox5LfX9yfLBlR1+KwgTyIJOC79gqI2wdUYWdp7 LQgZN7pSpcEW+necWx36pqMM9IqgzLvWmyxQB4hd1e9EXLhdVrC39vDTBwbJVhYR3qay fwS0XaFvg6wflTz3EmNFmgN6OdlrQwrmShTzMExfDhVUwQca9w36Pkdo5E5yHLFbBxYU rDZw== X-Forwarded-Encrypted: i=1; AFNElJ/hockJyn184GBKk1fC8o178xDcftZRJTRAk9a9s8IWbqid6s7GMznDvZ+lowa/La5T+WW45FCvdH2IP8V1@lists.postgresql.org X-Gm-Message-State: AOJu0YwH1CYnvjLcePAt0iQYsSHSQtZqRvaAgjNU0sAidInxFON2LaJi YzlGkkYln9B3yKqN9ImW5ZNwfIrZ+laGH3pOn0ytyDRUYj4EtaofWNAfV7Z6gahjbESpboJRZyC WCFMMSlEwkQ8lU6t5TZHM6TOyBMYtgu83skK2F3Yd4w== X-Gm-Gg: Acq92OE/qMc9DeuBy32h0WhkSo/0tdWOhiMgkUpQJ9sCQThO0OhKxacntuOjhtAROcs 7aXkSRuLQ3DoiRQpQB/WAPJzvrVt6/bL2SjTnO+P6gxeKOl06X+qNKcZF+2tXrH11U6aeXjNTAu iPqFOm+44lo6cj4FXoYvLAfilYxnxGrFEsGb+NFLNJLlFW/QZXptYxpeGKd4RJ9iWkR/YszMKNQ SedAzyE4gAJ8zEJu+eIK/HYklG11+EfuyoU4AWu8d86bRYglmkED6fWx7eC0Uqp5Y+2ETSN3Xeu ZOHrtyU1sA10jz6x5N0KTSvufnR5siJ++REJ979qw9nrqIQpyzZg X-Received: by 2002:ac2:51d2:0:b0:5aa:6a11:3a29 with SMTP id 2adb3069b0e04-5aa8865d774mr2729671e87.3.1780905611777; Mon, 08 Jun 2026 01:00:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ewan Young Date: Mon, 8 Jun 2026 15:59:59 +0800 X-Gm-Features: AVVi8Cc9S7PiLA7fmiTa-xQAzCfPpijsLa2OHbbVuJU8KE3C7nlS7O4x7ojR5mM 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 Nitin, Thanks for v3. I re-applied it on top of current master (4cb2a986) and re-ran the regression suite: all 245 tests pass, and the collate.icu.utf8 set now covers both directions of the bug, including the false-positive case ('backslash' LIKE 'back\\slash%' -> f). LGTM, and changed commitfest status to "Ready for Commiter". Regards, Ewan Young On Sat, Jun 6, 2026 at 8:25=E2=80=AFPM Nitin Motiani wrote: > > > I reviewed the v2 patch. > > > > Thanks for the feedback. > > > > > 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. > > > > I have updated the commit message. I also added another test for this > scenario in v3. > > > 2. A small typo in the new comment in like_match.c: > > "occurences" should be "occurrences". > > > > Fixed the typo. > > Thanks, > Nitin Motiani > Google