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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, adam(dot)warland(at)infor(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, peter(at)eisentraut(dot)org
Subject: Re: BUG #19341: REPLACE() fails to match final character when using nondeterministic ICU collation
Date: 2025-12-02 21:44:53
Message-ID: e95a37e161a7d5de4436af7119f5fc1307b8ee61.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 2025-12-02 at 15:53 -0500, Tom Lane wrote:
> On the other hand ... is that comment really right about zero-length
> match being possible?  If it is, the API for this function is in
> need of redesign, because callers that try to find "the next match"
> would go into an infinite loop re-finding the same zero-length
> match over and over.

I know too little about exotic collations to answer that, but it sure
would be a problem. All I find in the discussion is the claim by
Peter E. in [1] that it is so. Perhaps he can enlighten us.

Yours,
Laurenz Albe

[1]: https://postgr.es/m/6107daa2-5cf7-4cf2-a526-626be1d15b18%40eisentraut.org

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Dean Rasheed 2025-12-02 23:03:45 Re: BUG #19340: Wrong result from CORR() function
Previous Message Tom Lane 2025-12-02 20:53:46 Re: BUG #19341: REPLACE() fails to match final character when using nondeterministic ICU collation