How to create case insensitive unique constraint

Поиск
Список
Период
Сортировка
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 по дате отправления: