| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера