Re: Full text index without accents

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Jonathan Bond-Caron <jbondc(at)openmv(dot)com>
Cc: 'Fco(dot) Mario Barcala Rodríguez' <lbarcala(at)freeresearch(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Full text index without accents
Date: 2008-07-25 14:02:29
Message-ID: 20080725140229.GE9891@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jonathan Bond-Caron wrote:
> This would probably help:
>
> CREATE OR REPLACE FUNCTION norm_text_latin(character varying)
> RETURNS character varying AS
> $BODY$
> declare
> p_str alias for $1;
> v_str varchar;
> begin
> select translate(p_str, 'ÀÁÂÃÄÅ', 'AAAAAA') into v_str;

Hmm, why not simply use to_ascii() ?

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2008-07-25 14:03:58 Re: PANIC: could not write to log file 0
Previous Message Alvaro Herrera 2008-07-25 13:58:16 Re: Do text columns create pg_toast tables?