RE: Re: unique index doesn't accept functions on fields

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Alessio Bragadini" <alessio(at)albourne(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Re: unique index doesn't accept functions on fields
Date: 2001-07-24 01:23:08
Message-ID: ECEHIKNFIMMECLEBJFIGOEFGCBAA.chriskl@familyhealth.com.au
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))
> > );
>
> Have you tried to just CREATE TABLE and later CREATE INDEX UNIQUE
> USING... ?

Postgres does not support functional indexing on multi-key indices.

Chris

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2001-07-24 01:37:08 Re: RE: OID wraparound (was Re: pg_depend)
Previous Message Tony Reina 2001-07-23 22:37:54 Does/Can PG store administrative statistics?