Re: Case insensitive uniqueness on column? - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Case insensitive uniqueness on column?
Date
Msg-id 200305250205.h4P25Tk22950@candle.pha.pa.us
Whole thread Raw
In response to Case insensitive uniqueness on column?  (doug <douglaskorchinski@nospam.shaw.ca>)
List pgsql-general
doug wrote:
> Can this be done in postgres?

You mean:

    Case insensitive uniqueness on column?

Yes.  You have to create a functional index on the column using
lower(col), like:

    CREATE UNIQUE INDEX uq on tab (lower(col))

I think that will work.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL Performance on OpenBSD
Next
From: Jules Chalier
Date:
Subject: latin1 -> unicode