Re: Case sensitivity

From: Darren Ferguson <darren(at)crystalballinc(dot)com>
To: Varun Kacholia <varunk(at)cse(dot)iitb(dot)ac(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Case sensitivity
Date: 2002-06-20 15:16:45
Message-ID: Pine.LNX.4.44.0206201114580.10306-100000@thread.crystalballinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok the way around this is

SELECT * FROM table WHERE LOWER(name) = LOWER('Word');
SEELCT * FROM table WHERE UPPER(name) = UPPER('Word');

Note that if you have indexes on these fields then they will not work when
upper and lower are used.

To use an index create an index on upper or lower name depending upon what
you want to use

HTH

Darren Ferguson

On Thu, 20 Jun 2002, Varun Kacholia wrote:

> Hi,
> Well while moving from Mysql to POstgresql this was one more difference
> : Case Sensitivity.
> The problem is in this query
> select * from table where name='Word'
> select * from table where name='word'
>
> Mysql treated both as same but postgres does not..i appreciate that
> it is good but is there a way that 'Word' can be matched with 'word'?
> i mean my queries can specify whether to be case sensitive or not.
> is there any such provision in postgres?
> or is it always case sensitive?
> thanks
>

--
Darren Ferguson

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Luc Lachance 2002-06-20 15:26:35 Re: circular REFERENCES
Previous Message Andrew Sullivan 2002-06-20 15:13:32 Re: Case sensitivity