Re: Accent-insensitive

From: Joel Burton <joel(at)joelburton(dot)com>
To: Pedro Igor <pedroigor(at)aip(dot)com(dot)br>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Accent-insensitive
Date: 2002-12-07 21:19:48
Message-ID: 20021207211948.GA5760@temp.joelburton.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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
> > ' language 'plpgsql';
> >
> > CREATE INDEX table_lower_ascii ON table(lower_ascii(field));

Pedro --

Please keep conversations on the list -- other people may know things I
don't (actually, they certainly will!), and it allows other people to
follow the conversation.

As for this being internal, I have no idea -- you could submit it as a
suggestion.

Given how easy it is to implement in plpgsql, I suspect this kind of thing will
stay out of the internals. Keep in mind that if you define this function
in your template1 database, you can have it created automatically in all
new databases you create, so it's one less thing to worry about.

HTH.

--

Joel BURTON | joel(at)joelburton(dot)com | joelburton.com | aim: wjoelburton
Independent Knowledge Management Consultant

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Dan Langille 2002-12-09 03:38:43 adding a GROUP BY to an outer join
Previous Message D'Arcy J.M. Cain 2002-12-07 13:17:48 Re: [SQL] SELECT FOR UPDATE locks whole table