Re: search on accents -> Why not include this function - Mailing list pgsql-admin

From Peter Eisentraut
Subject Re: search on accents -> Why not include this function
Date
Msg-id Pine.LNX.4.30.0103292007570.2091-100000@peter.localdomain
Whole thread Raw
In response to Re: search on accents -> Why not include this function  (Jaume Teixi <teixi@6tems.com>)
Responses Re: search on accents -> Why not include this function
List pgsql-admin
Jaume Teixi writes:

> > The reason there is no such implementation, and probably won't be any time
> > soon, is that this tool would either have to hard-code or ignore natural
> > language semantics, neither of which would make it practical.  Not all
> > languages have the same accent ignoring or accent folding rules or
> > conventions.
>
> This function is really fast.
> The accent method is a REAL need for almost all non-english languages.
> You should to explicity call this funciton like:
> select accents ('dali');
>              accents
> ----------------------------------
>  [dðÐ][aáÁàÀâÂäÄåÅãÃ]l[iíÍìÌîÎïÏ]
>
> so why to not to include on the next release ?

For the reason I cited above:  it is a too abstract approach for many
languages and/or applications.  For example in Swedish, a search for 'e'
should probably include 'é', since most users will not type that in
explicitly (it's not on the keyboard), but a search for 'a' should
normally not include 'å', since that it a completely separate letter (and
it is on the keyboard).  Additionally, this particular implementation
seems to be ISO-8859-1 charset specific.  I know a number of accented
letters that are a lot closer "siblings" to 'd' than 'ð' is.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: PG 7.0.3 & RH 7 IPC problems?
Next
From: Jaume Teixi
Date:
Subject: Re: search on accents -> Why not include this function