How to create a case-insensitive unique constraint?

Поиск
Список
Период
Сортировка
От Kynn Jones
Тема How to create a case-insensitive unique constraint?
Дата
Msg-id c2350ba40809021346l1ea74657jec9cb5ebd3496c49@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to create a case-insensitive unique constraint?
Re: How to create a case-insensitive unique constraint?
Список pgsql-general
Hi!

If I try something like

ALTER TABLE foo
  ADD CONSTRAINT foo_unique_xy
  UNIQUE ( UPPER( x ), UPPER( y ) );

...I get a syntax error

ERROR:  syntax error at or near "("
LINE 3:   UNIQUE ( UPPER( x ), UPPER( y ) );

Is there a way to do this?

TIA!

Kynn


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