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

From Tom Lane
Subject Re: PATCH: Allow empty targets in unaccent dictionary
Date
Msg-id 25215.1404171754@sss.pgh.pa.us
Whole thread Raw
In response to Re: PATCH: Allow empty targets in unaccent dictionary  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
List pgsql-hackers
Abhijit Menon-Sen <ams@2ndQuadrant.com> writes:
> At 2014-06-30 15:19:17 -0400, tgl@sss.pgh.pa.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



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: bad estimation together with large work_mem generates terrible slow hash joins
Next
From: Greg Stark
Date:
Subject: Re: heap vacuum & cleanup locks