Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qXOq6-006Bu1-Dk for pgsql-bugs@arkaria.postgresql.org; Sat, 19 Aug 2023 16:30:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qXOq3-001Kyd-6K for pgsql-bugs@arkaria.postgresql.org; Sat, 19 Aug 2023 16:30:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qXOq2-001KyV-TT for pgsql-bugs@lists.postgresql.org; Sat, 19 Aug 2023 16:30:11 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qXOpy-00152g-Ui for pgsql-bugs@lists.postgresql.org; Sat, 19 Aug 2023 16:30:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 37JGU4EB2334733; Sat, 19 Aug 2023 12:30:04 -0400 From: Tom Lane To: Michael Paquier cc: martin@schlossarek.me, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18057: unaccent removes intentional spaces In-reply-to: References: <18057-62712cad01bd202c@postgresql.org> Comments: In-reply-to Michael Paquier message dated "Fri, 18 Aug 2023 15:18:58 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2334731.1692462604.1@sss.pgh.pa.us> Date: Sat, 19 Aug 2023 12:30:04 -0400 Message-ID: <2334732.1692462604@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > 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? Yeah, we could extend the parsing rules that way. It would break any rules files that currently use double quote as a plain character, but it seems unlikely that there are any. In any case, as long as this wasn't back-patched I think such a change would be acceptable. regards, tom lane