Re: Howto have a unique restraint on UPPER (textfield) - Mailing list pgsql-sql

From Andreas
Subject Re: Howto have a unique restraint on UPPER (textfield)
Date
Msg-id 4B66583C.1050708@gmx.net
Whole thread Raw
In response to Re: Howto have a unique restraint on UPPER (textfield)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Howto have a unique restraint on UPPER (textfield)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Tom Lane schrieb:
> Andreas <maps.on@gmx.net> writes:
>   
>> So I had the missconception that UNIQUE (...) within CREATE TABLE (...) 
>> was actually just an shorter way to define a unique index which it is not.
>>     
>
> 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? The parser could just 
take everything in the ( ) and use it as is.

Somehow there must be a notice in the meta data to mark the difference.
pgAdmin shows a unique as constraint but no index when created within 
"create table".
The unique-index only shows up when created seperately.


regards
Andreas




pgsql-sql by date:

Previous
From: Dave Clements
Date:
Subject: Re: Fwd: Help required on query performance
Next
From: Tom Lane
Date:
Subject: Re: Howto have a unique restraint on UPPER (textfield)