Re: Accent insensitive search? - Mailing list pgsql-general

From Thom Brown
Subject Re: Accent insensitive search?
Date
Msg-id bddc86150903180953g65ecee0ag8917266e1e01f0cc@mail.gmail.com
Whole thread Raw
In response to Re: Accent insensitive search?  (Pedro Doria Meunier <pdoria@netmadeira.com>)
Responses Re: Accent insensitive search?
List pgsql-general

2009/3/18 Pedro Doria Meunier <pdoria@netmadeira.com>
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

pgsql-general by date:

Previous
From: "cifroes"
Date:
Subject: Re: Accent insensitive search?
Next
From: Thom Brown
Date:
Subject: Re: Accent insensitive search?