Re: BUG #5115: ADD UNIQUE table_constraint with expression - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5115: ADD UNIQUE table_constraint with expression
Date
Msg-id 14044.1255534674@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5115: ADD UNIQUE table_constraint with expression  ("Vladimir Kokovic" <vladimir.kokovic@a-asoft.com>)
List pgsql-bugs
Vladimir Koković <vladimir.kokovic@a-asoft.com> writes:
> Real question is "Why we need two syntaxes for the same thing ?"

Because the SQL standard says so: UNIQUE-constraint syntax is limited
to simple column names.  We can't just extend that because it would
break the information_schema views, which are only capable of
representing unique/pk constraints on simple columns.

CREATE INDEX, being outside the scope of the spec, doesn't have to worry
about that.
        regards, tom lane


pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #5115: ADD UNIQUE table_constraint with expression
Next
From: "Turner, Ian"
Date:
Subject: Re: Kerberos authentication, Active Directory, and PostgreSQL