Re: Case insensitive uniqueness on column?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Case insensitive uniqueness on column?
Дата
Msg-id 200305250205.h4P25Tk22950@candle.pha.pa.us
обсуждение исходный текст
Ответ на Case insensitive uniqueness on column?  (doug <douglaskorchinski@nospam.shaw.ca>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: PostgreSQL Performance on OpenBSD
Следующее
От: Jules Chalier
Дата:
Сообщение: latin1 -> unicode