How to create case insensitive unique constraint

Поиск
Список
Период
Сортировка
От Andrus
Тема How to create case insensitive unique constraint
Дата
Msg-id dgs1hn$lco$1@news.hub.org
обсуждение исходный текст
Ответы Re: How to create case insensitive unique constraint  (Csaba Nagy <nagy@ecircle-ag.com>)
Re: How to create case insensitive unique constraint  ("John D. Burger" <john@mitre.org>)
Список pgsql-general
I want to disable dupplicate customer names in a database regardless to
case.

I tried

CREATE TABLE customer ( id SERIAL, name CHARACTER(70));

ALTER TABLE customer
   ADD constraint customer_name_unique UNIQUE (UPPER(name));

but this is not allowed in Postgres

Any idea ?

Andrus.



В списке pgsql-general по дате отправления:

Предыдущее
От: "Jeanne Thibeault"
Дата:
Сообщение: connecting windows xp to remote server
Следующее
От: Csaba Nagy
Дата:
Сообщение: Re: How to create case insensitive unique constraint