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