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 1qXVzd-006Rto-Gs for pgsql-bugs@arkaria.postgresql.org; Sun, 20 Aug 2023 00:08:33 +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 1qXVzb-002jTQ-Hl for pgsql-bugs@arkaria.postgresql.org; Sun, 20 Aug 2023 00:08:31 +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 1qXVzb-002jTI-8C for pgsql-bugs@lists.postgresql.org; Sun, 20 Aug 2023 00:08:31 +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 1qXVzY-0018Xl-Bt for pgsql-bugs@lists.postgresql.org; Sun, 20 Aug 2023 00:08:30 +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 37K08QOr2399067; Sat, 19 Aug 2023 20:08:26 -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> <2334732.1692462604@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Sun, 20 Aug 2023 08:57:29 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2399065.1692490106.1@sss.pgh.pa.us> Date: Sat, 19 Aug 2023 20:08:26 -0400 Message-ID: <2399066.1692490106@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Sat, Aug 19, 2023 at 12:30:04PM -0400, Tom Lane wrote: >> 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. > Okay, thanks. Note that we do use double-quotes as a translated > character in a few cases, but as long as these are only handled as a > single character we could be OK. Oh, shame on me for not actually looking into unaccent.rules :-( That does make it more complicated, although I think it's still the case that an incompatible change could be OK. > Or actually, wouldn't it be better > to always force escaping even for double quotes listed as single > characters? I was envisioning following SQL identifier rules, that is you double the double quote. Then the existing " entries would have to become """", which isn't much fun. But what you're suggesting would make both " and \ into magic characters, doubling the chance of problems with existing rules files. We could perhaps allow standalone " to still be considered valid, but that adds ambiguity that I think we'd eventually regret. For example, what is the interpretation of " " Is that a (rather useless) translation of " to itself, or is it a command to delete tab characters? So I think a clean break would be better. regards, tom lane