[ remembering previous discussions more clearly... ] Actually there is a concrete problem here: unique constraints are supposed to be represented in the information_schema views, and there is no spec-compliant way to do that for a constraint on something other than a column. We'd have to guess at what the SQL committee would do about that, and the odds of guessing exactly right don't seem encouraging.
Considering that a unique index is a unique constraint, then isn't allowing expressional unique indexes contradictory to the above? It seems that "CREATE UNIQUE INDEX" currently does not pass isconstraint as true to DefineIndex, otherwise index_create() would have cribbed with: "constraints cannot have index expressions" error. Since this patch is going to consider creating unique/primary indexes assuming them to be constraints, IMHO we should be uniform about unique constraints semantics. That might mean that we only support expressionless, non-predicate indexes via "INCLUDING CONSTRAINTS"? Regards, Nikhils -- EnterpriseDB http://www.enterprisedb.com