PATCH: Allow empty targets in unaccent dictionary - Mailing list pgsql-hackers

From Mohammad Alhashash
Subject PATCH: Allow empty targets in unaccent dictionary
Date
Msg-id 53530183.6030807@alhashash.net
Whole thread Raw
Responses Re: PATCH: Allow empty targets in unaccent dictionary  (David Fetter <david@fetter.org>)
Re: PATCH: Allow empty targets in unaccent dictionary  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
List pgsql-hackers
Hi,

Currently, unaccent extension only allows replacing one source character
with one or more target characters. In Arabic, Hebrew and possibly other
languages, diacritics are standalone characters that are being added to
normal letters. To use unaccent dictionary for these languages, we need
to allow empty targets to remove diacritics instead of replacing them.

The attached patch modfies unaacent.c so that dictionary parser uses
zero-length target when the line has no target.

Best Regards,

Mohammad Alhashash


Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Avoiding deeply nested AND/OR trees in the parser
Next
From: Bruce Momjian
Date:
Subject: Re: Avoiding deeply nested AND/OR trees in the parser