PATCH: Allow empty targets in unaccent dictionary

From: Mohammad Alhashash <alhashash(at)alhashash(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: PATCH: Allow empty targets in unaccent dictionary
Date: 2014-04-19 23:06:43
Message-ID: 53530183.6030807@alhashash.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
unaccent_empty_target.patch text/plain 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2014-04-20 01:22:33 Re: Avoiding deeply nested AND/OR trees in the parser
Previous Message Tom Lane 2014-04-19 21:50:17 Re: Avoiding deeply nested AND/OR trees in the parser