Search Postgresql Archives

Re: Accent insensitive search?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




2009/3/18 Pedro Doria Meunier <pdoria@xxxxxxxxxxxxxx>
Hi,

use ILIKE

HTH,

ILIKE is only case-insensitive, and won't match accented characters.  The only thing I can think of doing is to create a function which will replace characters with their equivalent non-accented counterparts and use that in the query.

Example: SELECT name FROM people WHERE unaccent_string(name) ~* 'Pédro';

The function would perform a reg-ex replace similar to: s/[èééêë]/e

Just an idea

Thom

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux