Skip site navigation (1) Skip section navigation (2)

Re: case insensitive database ?

From: Joel Burton <jburton(at)scw(dot)org>
To: Thorsten Mauch <mauch(at)imkenberg(dot)de>
Cc: "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: case insensitive database ?
Date: 2001-04-24 22:25:31
Message-ID: Pine.LNX.4.21.0104241822290.22793-100000@olympus.scw.org (view raw or flat)
Thread:
Lists: pgsql-novice
On Wed, 25 Apr 2001, Thorsten Mauch wrote:

> Is it possible to setup a database that is case insensitive ?
> is it also possible with a multbyte database ?

AFAIK, no, it's not possible to set up a case-insensitive database.
We're very into sensitivity in this community. :-)


Some possibilities: 

the ILIKE operator does case insensitive searching,
as does the case insensitive regex operator (~*).


search using lower() or upper(). 
select * from pers where lower(fname) = 'joel';

(to speed these up, you can index pers on lower(fname)!)
"\h create index" for help


have two fields, fname and fname_lower, with a trigger to copy
lower(fname) to fname_lower on update.


Good luck!

HTH,
-- 
Joel Burton   <jburton(at)scw(dot)org>
Director of Information Systems, Support Center of Washington


In response to

pgsql-novice by date

Next:From: Poul L. ChristiansenDate: 2001-04-24 22:26:09
Subject: Re: case insensitive database ?
Previous:From: Joel BurtonDate: 2001-04-24 22:22:10
Subject: Re: Re: BETWEEN clause

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group