Re: Accent insensitive search?

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Accent insensitive search?
Date: 2009-03-18 17:15:46
Message-ID: 20090318171546.GE32672@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Mar 18, 2009 at 04:29:24PM -0000, cifroes wrote:
> I have a DB in utf-8 and postgres 8.3.x.
>
> How can I do an accent insensitive search (like ...) ?

No good idea at the moment; I'd somehow expect to find this sort of
normalization in the functionality provided by the "text search" code.
My reasoning being that searching for a word should find it if you're
being accurate or lazy with your accents. I've not been able to coax it
into doing anything reliable though.

If you can't find anything better in PG; the translate[1] function would
be my best suggestion. Performance should be better than using regular
expressions.

--
Sam http://samason.me.uk/

[1] http://www.postgresql.org/docs/current/static/functions-string.html

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Will Rutherdale (rutherw) 2009-03-18 17:16:46 Re: DBD::Pg's $dbh->func( "/path/to/file", 'lo_import' ) fails silently
Previous Message Thom Brown 2009-03-18 17:07:52 Re: Accent insensitive search?