pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: martin@schlossarek.me
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18057: unaccent removes intentional spaces
Date: Fri, 18 Aug 2023 15:18:58 +0900
Message-ID: <ZN8NUpx2f9pB+F/g@paquier.xyz> (raw)
In-Reply-To: <ZNwRq4nV7CBXAoJN@paquier.xyz>
References: <18057-62712cad01bd202c@postgresql.org>
	<ZNwRq4nV7CBXAoJN@paquier.xyz>

On Wed, Aug 16, 2023 at 09:00:43AM +0900, Michael Paquier wrote:
> 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.

I was looking at the code, and my first impression was right.  All
leading and trailing whitespaces between the two characters listed in
the rule file are discarded.  The thing is that we clearly document
the parsing rules for the sake of any custom files one can feed to the
extension:
https://www.postgresql.org/docs/devel/unaccent.html

I am not sure what we can do here.  Doing nothing is certainly an
option, but I am wondering if we could put in place an extra rule
where whitespaces can be part of the translated character if it uses
double quotes, for example.  Thoughts?
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (10+ messages)  latest in thread

Message-ID: <ZN8NUpx2f9pB+F/g@paquier.xyz>
Permalink:  ../ZN8NUpx2f9pB+F%2Fg@paquier.xyz/
Also on:    postgresql.org/message-id/ZN8NUpx2f9pB+F/g@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, martin@schlossarek.me, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18057: unaccent removes intentional spaces
  In-Reply-To: <ZN8NUpx2f9pB+F/g@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox