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 ZOMOzI9Mj3gKEdqY@paquier.xyz
Whole thread Raw
In response to Re: BUG #18057: unaccent removes intentional spaces  (Michael Paquier <michael@paquier.xyz>)
Responses Re: BUG #18057: unaccent removes intentional spaces
List pgsql-bugs
On Sun, Aug 20, 2023 at 09:20:48AM +0900, Michael Paquier wrote:
> Apologies for the confusion.  I was thinking to also escape \ in
> quoted strings.  Your suggestion to use a second double-quote for the
> escaping is fine by me.  """" feels a bit ugly-ish in the rules file,
> for sure, but that does not look like a huge issue to me as long as
> the python script generates consistent contents ;)

Please find attached a patch to achieve that.  This includes tweaks
for the python script to update unaccent.rules, docs about the rules
for the quotes and tests.

The patch also includes a custom rule file that I have used to stress
more the parsing logic, but I intend to remove it in the final version
of the patch (and it fails with meson).  It would be possible to have
a TAP test that sneaks a custom rule file in the installation tree,
but that's not worth the extra cycles IMO.

What do you think?
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #17928: Standby fails to decode WAL on termination of primary
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm()