Re: BUG #5115: ADD UNIQUE table_constraint with expression

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vladimir Koković <vladimir(dot)kokovic(at)a-asoft(dot)com>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: BUG #5115: ADD UNIQUE table_constraint with expression
Date: 2009-10-14 15:37:54
Message-ID: 14044.1255534674@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?UTF-8?B?VmxhZGltaXIgS29rb3ZpxIc=?= <vladimir(dot)kokovic(at)a-asoft(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Turner, Ian 2009-10-14 16:33:07 Re: Kerberos authentication, Active Directory, and PostgreSQL
Previous Message Heikki Linnakangas 2009-10-14 15:23:32 Re: BUG #5115: ADD UNIQUE table_constraint with expression