Re: Accent-insensitive - Mailing list pgsql-sql

From Cédric Dufour (public)
Subject Re: Accent-insensitive
Date
Msg-id 007401c29d66$b1374690$3c8addd5@cednetwork.net
Whole thread Raw
In response to Accent-insensitive  ("Pedro Igor" <pedroigor@aip.com.br>)
Responses Re: Accent-insensitive  (Joel Burton <joel@joelburton.com>)
List pgsql-sql
Use the 'to_ascii' function to convert your string to the "no accent" ASCII equivalent before accomplishing your comparison
 
SELECT foo FROM table WHERE ( to_ascii(foo) ILIKE to_ascii('caractères accentués') );
 
This does not work with all database locale (LATIN1 is OK, but LATIN9 is not).
 
I was actually wondering if this is efficient enough or if there is any more efficient method to accomplish this...
 
    Cédric D.
-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Pedro Igor
Sent: Friday, December 06, 2002 14:31
To: pgsql-sql@postgresql.org
Subject: [SQL] Accent-insensitive

Does have PostgreSQL some option to allow me execute selects accent-insensitive ?
I can´t find any reference, including the manual ....
 
Pedro Igor

pgsql-sql by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: SELECT FOR UPDATE locks whole table
Next
From: Joel Burton
Date:
Subject: Re: Accent-insensitive