Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2A5AD475CE5 for ; Fri, 6 Dec 2002 15:34:32 -0500 (EST) Received: from aristote2.infomaniak.ch (aristote2.infomaniak.ch [212.23.249.227]) by postgresql.org (Postfix) with ESMTP id 42C264769B4 for ; Fri, 6 Dec 2002 15:33:15 -0500 (EST) Received: from cedserver (unverified [213.221.138.60]) by aristote2.infomaniak.ch (Rockliffe SMTPRA 4.5.6) with ESMTP id ; Fri, 6 Dec 2002 21:31:12 +0100 From: =?iso-8859-1?Q?C=E9dric_Dufour_=28public=29?= To: "Pedro Igor" , Subject: Re: Accent-insensitive Date: Fri, 6 Dec 2002 21:33:10 +0100 Message-ID: <007401c29d66$b1374690$3c8addd5@cednetwork.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0075_01C29D6F.12FD3530" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <002401c29d2b$a6e168a0$0b00010a@aip.com.br> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/81 X-Sequence-Number: 10669 This is a multi-part message in MIME format. ------=_NextPart_000_0075_01C29D6F.12FD3530 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit 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 ------=_NextPart_000_0075_01C29D6F.12FD3530 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Use the 'to_ascii' function to convert your string to the "no acce= nt"=20 ASCII equivalent before accomplishing your comparison
 
SELECT foo FROM table WHERE ( to_ascii(foo) ILIKE to_ascii('caract= =E8res=20 accentu=E9s') );
 
This does not work with all database locale (LATIN1 is OK, but LAT= IN9 is=20 not).
 
I was actually wondering if this is efficient enough or if there i= s any=20 more efficient method to accomplish this...
 
    C=E9dric D.
-----Original Message-----
From:=20 pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]= On=20 Behalf Of Pedro Igor
Sent: Friday, December 06, 2002=20 14:31
To: pgsql-sql@postgresql.org
Subject: [SQL]=20 Accent-insensitive

Does have PostgreSQL some option to= allow me=20 execute selects accent-insensitive ?
I can=B4t find any reference, including = the manual=20 ....
 
Pedro Igor
------=_NextPart_000_0075_01C29D6F.12FD3530--