Joseph Shraibman <[EMAIL PROTECTED]> writes: > This works: > ALTER TABLE segment ADD CONSTRAINT name unique(textfield, reseller);
> This doesn't: > ALTER TABLE segment ADD CONSTRAINT name unique(lower(textfield), > reseller); I don't think this is a bug. The unique-constraint syntax is defined by the SQL spec and it only allows simple column names. If we extended it as you suggest, we would break code that expects constraints to apply to columns (there is some in the backend as well as in clients). regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend