Re: [SQL] Accent-insensitive

2002-12-07 Thread Joel Burton
On Sat, Dec 07, 2002 at 07:06:45PM -0300, Pedro Igor wrote: > Thanks, you know if some possible release would have some internal to deal > with this ? > > Abraços > Pedro Igor > > > > CREATE FUNCTION lower_ascii (text) RETURNS text AS ' > > BEGIN > > RETURN lower(to_ascii($1)); > > END > >

Re: [SQL] Accent-insensitive

2002-12-06 Thread Joel Burton
On Fri, Dec 06, 2002 at 09:33:10PM +0100, Cédric Dufour (public) wrote: > 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') ); > > T

Re: [SQL] Accent-insensitive

2002-12-06 Thread Cédric Dufour (public)
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).