unique index doesn't accept functions on fields

From: domingo(at)dad-it(dot)com (Domingo Alvarez Duarte)
To: pgsql-hackers(at)postgresql(dot)org
Subject: unique index doesn't accept functions on fields
Date: 2001-07-22 10:16:55
Message-ID: 70a76315.0107220216.2dcff192@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 idea ?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2001-07-22 11:09:52 Re: Pgbench Performance on PGSQL
Previous Message eCommerce Software Solutions Inc. 2001-07-22 04:19:11 Fw: Leaking Handles in Postgres 7.1.2 on Cygwin dll 1.3.2 on Win 2000