Re: PATCH: Allow empty targets in unaccent dictionary

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Mohammad Alhashash <alhashash(at)alhashash(dot)net>
Subject: Re: PATCH: Allow empty targets in unaccent dictionary
Date: 2014-06-30 23:42:34
Message-ID: 25215.1404171754@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com> writes:
> At 2014-06-30 15:19:17 -0400, tgl(at)sss(dot)pgh(dot)pa(dot)us wrote:
>> Anyway, this raises the question of whether the current patch is
>> actually a desirable way to do things, or whether it would be better
>> if the unaccenting rules were like "base-char accent-char" ->
>> "base-char".

> It might be useful to be able to write such rules, but it would be
> highly impractical to do so instead of being able to single out
> accent-chars for removal.

On reflection, if we were thinking of this as a general
substring-replacement mechanism rather than just a de-accenter
(and why shouldn't we think of it that way?), then clearly both
multi-character source strings and zero-character substitute strings
could be of value. The fact that the existing patch only fixes
one of those omissions isn't a strike against it.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2014-06-30 23:55:14 Re: heap vacuum & cleanup locks
Previous Message Tomas Vondra 2014-06-30 23:24:24 Re: bad estimation together with large work_mem generates terrible slow hash joins