Re: Case Insensitive / Acent insensitive

From: "Jaime Casanova" <systemguards(at)gmail(dot)com>
To: mortega(at)tc(dot)com(dot)ve
Cc: "Mario Wojcik" <mariowojcik(at)yahoo(dot)com(dot)ar>, pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Case Insensitive / Acent insensitive
Date: 2007-08-06 23:34:37
Message-ID: c2d9e70e0708061634k1b9dd7a8ya15ad4060dc08bca@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On 8/6/07, Miguel Ortega <mortega(at)tc(dot)com(dot)ve> wrote:
> Hola...
> Mario Wojcik escribió:
> > Hola Gente.
> > Me cuentan que en firebird es posible hacer busquedas de este tipo, o
> > sea hacer un select pidiendo 'Cordoba' y me devuelva:
> > Córdoba
> > Cordoba
> > CORDOBA
> > cordoba
> >
> > Hay algo asi en postgresql?
> >
> Mmm... Tal vez usando una mezcla de to_ascii con ilike:
>
> SELECT * FROM tabla WHERE to_ascii(campo) = ilike(to_ascii(parametro) ||
> '%');
>

creo que lo que trataste de hacer fue:

SELECT * FROM tabla
WHERE lower(to_ascii(campo)) = lower(to_ascii(parametro));

--
Atentamente,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Jaime Casanova 2007-08-06 23:45:34 Re: como devolver una consulta modificada?¿
Previous Message Jaime Casanova 2007-08-06 23:28:40 Re: ayuda