[SQL] unique index on more than one field using functions

2001-07-23 Thread Domingo Alvarez Duarte
I'm trying create a unique index using more than one field and applying a function in one field to achieve case insensitive uniqueness but postgresql doesn't accept. create table a( id int primary key, id2 int not null, name varchar(50), unique(id2, lower(name)) ); Anyone have an i

Re: [SQL] unique index on more than one field using functions

2001-07-23 Thread Stephan Szabo
On 22 Jul 2001, Domingo Alvarez Duarte wrote: > I'm trying create a unique index using more than one field and > applying a function in one field to achieve case insensitive > uniqueness but postgresql doesn't accept. > > create table a( > > id int primary key, > id2 int not null, > na