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