Re: [ADMIN] About lower and uppercase - Mailing list pgsql-general

From Stephan Szabo
Subject Re: [ADMIN] About lower and uppercase
Date
Msg-id 20021104214740.U19332-100000@megazone23.bigpanda.com
Whole thread Raw
In response to About lower and uppercase  (Sonia Sánchez Díaz <geek24@avantel.net>)
List pgsql-general
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.



pgsql-general by date:

Previous
From: Justin Clift
Date:
Subject: PostgreSQL IRC Channel... who's the Admin?
Next
From: Neil Conway
Date:
Subject: Re: [HACKERS] PostgreSQL IRC Channel... who's the Admin?