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