Skip site navigation (1) Skip section navigation (2)

Re: Seaching without accents

From: Marco Lazzeri <marcomail(at)noze(dot)it>
To: Augusto Cesar Castoldi <castoldi(at)npd(dot)ufsc(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Seaching without accents
Date: 2004-01-28 13:51:15
Message-ID: 1075297875.2490.33.camel@macbeth.intranet.noze.it (view raw or flat)
Thread:
Lists: pgsql-general
Il mer, 2004-01-28 alle 13:42, Augusto Cesar Castoldi ha scritto:
> How can I configure postgreSQL to search without acents?

You have to write queries using TO_ASCII function and 'LATIN 1'
characters encoding.

Example:

SELECT * FROM my_table WHERE TO_ASCII(value, 'LATIN 1') = 
TO_ASCII('Vàlùé', 'LATIN 1');

Cheers,
-- 
Marco Lazzeri


In response to

Responses

pgsql-general by date

Next:From: Franco Bruno BorghesiDate: 2004-01-28 13:52:32
Subject: Re: Logging all queries (almost there)
Previous:From: Augusto Cesar CastoldiDate: 2004-01-28 12:42:39
Subject: Seaching without accents

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group