From: | Joel Burton <jburton(at)scw(dot)org> |
---|---|
To: | Bruce Richardson <brichard(at)cafod(dot)org(dot)uk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Case sensitivity |
Date: | 2001-02-27 16:08:08 |
Message-ID: | Pine.LNX.4.21.0102271104560.9947-100000@olympus.scw.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)scw(dot)org>
Director of Information Systems, Support Center of Washington
From | Date | Subject | |
---|---|---|---|
Next Message | Hans Jeuken | 2001-02-27 16:11:07 | how to examin the database structure with an sql command |
Previous Message | Tom Lane | 2001-02-27 16:01:36 | Re: Last x records |