Re: BUG #18057: unaccent removes intentional spaces - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #18057: unaccent removes intentional spaces
Date
Msg-id ZNwRq4nV7CBXAoJN@paquier.xyz
Whole thread Raw
In response to BUG #18057: unaccent removes intentional spaces  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #18057: unaccent removes intentional spaces
List 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

Attachment

pgsql-bugs by date:

Previous
From: Andy Fan
Date:
Subject: Re: BUG #18014: Releasing catcache entries makes schema_to_xmlschema() fail when parallel workers are used
Next
From: Thomas Munro
Date:
Subject: Re: BUG #17928: Standby fails to decode WAL on termination of primary