Re: Case sensitivity - Mailing list pgsql-general

From Joel Burton
Subject Re: Case sensitivity
Date
Msg-id Pine.LNX.4.21.0102271104560.9947-100000@olympus.scw.org
Whole thread Raw
In response to Case sensitivity  (brichard@cafod.org.uk (Bruce Richardson))
List pgsql-general
On Tue, 27 Feb 2001, Bruce Richardson wrote:

> Discovering that text fields in Postgres are case sensitive - so "Text"
> <> "text" and both can go into the same UNIQUE column - threw me a bit,
> as this is different from other databases I've worked with.
>
> Is there a toggle to turn off case sensitivity, either for a whole
> database or for a column?  Or do I just have to get used to ~*?

No, you can't turn it off, and yes, many people do notice that it's not
the way some other databases work. (Some database make this configurable).

You can use ~*, you can also index on function results (eg, you can create
an index on a function. So, you could

  create unique index yourtable_pkey on yourtable ( upper(pkeyfield));

which would only allow one 'Joel', regardless of how you cap me.

--
Joel Burton   <jburton@scw.org>
Director of Information Systems, Support Center of Washington


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Last x records
Next
From: Peter Eisentraut
Date:
Subject: Re: Infinate Loop during gmake