Re: About lower and uppercase

From: "geek24(at)avantel(dot)net" <geek24(at)avantel(dot)net>
To: pgsql-general(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Re: About lower and uppercase
Date: 2002-11-05 15:42:59
Message-ID: 293580-220021125154259358@M2W063.mail2web.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Thanks!!!

I use ilike and I get the result that I want...

Thanks!!!!!

Regards!

Original Message:
-----------------
From: Stephan Szabo sszabo(at)megazone23(dot)bigpanda(dot)com
Date: Mon, 04 Nov 2002 21:50:06 -0800 (PST)
To: geek24(at)avantel(dot)net, pgsql-general(at)postgresql(dot)org,
pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] About lower and uppercase

On Mon, 4 Nov 2002, [iso-8859-1] Sonia Sánchez Díaz wrote:

> Hi!
>
> I don't know if this is possible from postgresql configuration...
>
> I want to ignore the use of uppercase and lowercase from the data restored
> into the DB...
>
> I mean, if I write a query like this:
>
> select * from fruits where fruit_name like 'orange';
>
> I could get any result where the string looks like:
>
> orange
> Orange
> ORANGE
>
> Is it possible???

Not really without doing a little bit of changing
to the query (for example using ILIKE rather than LIKE
or lower(fruit_name) like 'orange' with an appropriate
index on lower(fruit_name).

Theoretically, it could perhaps be possible to create a locale
which compare 'orange' and 'OraNgE' equally and then
initdb in that locale, but I've never tried it so I don't
know if it'd work.

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .

Browse pgsql-admin by date

  From Date Subject
Next Message geek24@avantel.net 2002-11-05 15:43:01 Re: About lower and uppercase
Previous Message dima 2002-11-05 09:24:34 Re: dumping a password-protected db from a perl script or

Browse pgsql-general by date

  From Date Subject
Next Message geek24@avantel.net 2002-11-05 15:43:01 Re: About lower and uppercase
Previous Message Neil Conway 2002-11-05 15:11:05 Re: Compiling Postgres 7.2.3 - problem with JDBC