On Jul 14, 2005, at 3:14 AM, Rob Brenart wrote:
I have a simple table to store account names... I want each name to
be unique in a case insensitive manner... but I want the case the
user enters to be remembered so I can't do a simple lower() on the
data's way in.
Is there an easy way to
create unique index tbl_iname_idx on tbl (lower(name_field))
By the way, in case it wasn't obvious, this has a nice side-benefit.
Namely, PG will use that index for caseless lookups, so you can do
this:
select * from tbl where lower(name_field) = lower('John');
very efficiently.
- John
Klint Gore wrote:
On Thu, 14 Jul 2005 02:14:16 -0500, Rob Brenart <[EMAIL PROTECTED]> wrote:
I have a simple table to store account names... I want each name to be
unique in a case insensitive manner... but I want the case the user
enters to be remembered so I can't do a simple lower() on t
Rob Brenart schrob:
> I have a simple table to store account names... I want each name to be
> unique in a case insensitive manner... but I want the case the user
> enters to be remembered so I can't do a simple lower() on the data's
> way in.
>
> Is there an easy way to go about this?
Would crea
On Thu, 14 Jul 2005 02:14:16 -0500, Rob Brenart <[EMAIL PROTECTED]> wrote:
> I have a simple table to store account names... I want each name to be
> unique in a case insensitive manner... but I want the case the user
> enters to be remembered so I can't do a simple lower() on the data's way in.
# [EMAIL PROTECTED] / 2005-07-14 02:14:16 -0500:
> I have a simple table to store account names... I want each name to be
> unique in a case insensitive manner... but I want the case the user
> enters to be remembered so I can't do a simple lower() on the data's way in.
CREATE TABLE tbl (col
I have a simple table to store account names... I want each name to be
unique in a case insensitive manner... but I want the case the user
enters to be remembered so I can't do a simple lower() on the data's way in.
Is there an easy way to go about this? Am I about to write my first
server sid