Re: Howto have a unique restraint on UPPER (textfield)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Howto have a unique restraint on UPPER (textfield)
Дата
Msg-id 29274.1264999316@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Howto have a unique restraint on UPPER (textfield)  (Andreas <maps.on@gmx.net>)
Список pgsql-sql
Andreas <maps.on@gmx.net> writes:
> Tom Lane schrieb:
>> Well, it is that --- it just doesn't provide access to all the features
>> that CREATE INDEX does.
>> 
> So as it is a shortcut for "create index" then why would the function 
> call of upper not be accepted when the sql parser maps the 
> uniqe-constraint into the "create index" command?

Because the UNIQUE constraint syntax is defined by the SQL standard,
and among other things the standard requires all UNIQUE constraints
to be represented in the information_schema.  But the information_schema
views don't have the flexibility to represent anything but simple column
values in a unique constraint.  So we just expose that in CREATE INDEX,
which is outside the standard anyway.
        regards, tom lane


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

Предыдущее
От: Andreas
Дата:
Сообщение: Re: Howto have a unique restraint on UPPER (textfield)
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Fwd: Help required on query performance