Re: unique index on function and column - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: unique index on function and column
Date
Msg-id 20020625203453.GA23747@wolff.to
Whole thread Raw
In response to Re: unique index on function and column  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
On Tue, Jun 25, 2002 at 13:09:25 -0700, Josh Berkus <josh@agliodbs.com> wrote:
> Bruno,
> 
> > Is there a simple way to do something like the following:
> > create unique index inst_u_app on inst (lower(host), psport);
> > 
> > It looks like you can have an index on several columns, but not
> > several functions.
> 
> So?  Create two seperate indexes.
> 
> Multi-column indexes are almost always less useful that you'd expected, 
> anyway.

I was using it to implement a constraint, not to do searches. Two separate
indexes wouldn't work for that.




pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: unique index on function and column
Next
From: Roberto Mello
Date:
Subject: PostgreSQL Cookbook update