Re: BUG #18057: unaccent removes intentional spaces

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: martin(at)schlossarek(dot)me, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18057: unaccent removes intentional spaces
Date: 2023-08-16 00:00:43
Message-ID: ZNwRq4nV7CBXAoJN@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Aug 15, 2023 at 07:54:57PM +0000, PG Bug reporting form wrote:
> I discovered that the unaccent extension also removes intentional spaces
> that are explicitly specified in the accent.rules. As far as I see it
> correctly, all fraction characters are affected, for example:
>
> ```sql
> # select unaccent('1½');
> --- expected output: 1 1/2
> --- actual output: 11/2
> ```

Agreed that this looks incorrect as-is. This goes as far as 9a206d0
when these has been introduced, and it looks like the culprit is
around initTrie() where the entries are loaded. See around t_isspace,
for example.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2023-08-16 03:29:49 Re: BUG #17928: Standby fails to decode WAL on termination of primary
Previous Message Andy Fan 2023-08-15 23:34:02 Re: BUG #18014: Releasing catcache entries makes schema_to_xmlschema() fail when parallel workers are used