Re: BUG #19341: REPLACE() fails to match final character when using nondeterministic ICU collation

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, adam(dot)warland(at)infor(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19341: REPLACE() fails to match final character when using nondeterministic ICU collation
Date: 2025-12-02 17:45:47
Message-ID: 9e6f15bbd30f8d64027ee32551bdcaed9506fc9f.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 2025-12-02 at 19:29 +0200, Heikki Linnakangas wrote:
> I added a simple test for this, and I think this is still not quite
> right. I added the following to collate.icu.utf test:
>
> +-- Test for match at the end of the string. (We had a bug on that
> +-- once)
> +SELECT a, b, replace(b COLLATE ignore_accents, 'te', 'ma') FROM test4nfd;
> + a | b | replace
> +---+------+---------
> + 1 | cote | coma
> + 2 | côte | coma
> + 3 | coté | coma
> + 4 | côté | coma
> +(4 rows)
> +
>
> In the added test query, the accents on the 'o' are stripped, which
> doesn't look correct.

I am not sure if that is OK or not (after all, it's an accent
insensitive collation, so "coma" and "côma" should be the same).

But it seems unrelated to the bug report at hand.

Yours,
Laurenz Albe

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Laurenz Albe 2025-12-02 17:51:14 Re: BUG #19341: REPLACE() fails to match final character when using nondeterministic ICU collation
Previous Message Heikki Linnakangas 2025-12-02 17:29:06 Re: BUG #19341: REPLACE() fails to match final character when using nondeterministic ICU collation