Re: primary key on lower(varchar)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: primary key on lower(varchar)
Дата
Msg-id 25937.1136608548@sss.pgh.pa.us
обсуждение исходный текст
Ответ на primary key on lower(varchar)  (<me@alternize.com>)
Список pgsql-novice
<me@alternize.com> writes:
> why can't i define a primary key on a varchar field as being
> lower(field)?

Primary keys are only on simple field values; that's what the SQL
standard requires, and that's what we do.

I don't really see the use-case for what you want anyway.  Why don't
you just require the field to be all lower case, eg with a CHECK
constraint?

            regards, tom lane

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: SQL Question
Следующее
От:
Дата:
Сообщение: Re: primary key on lower(varchar)