pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: pgsql-sql@postgresql.org
Subject: Re: unique index on function and column
Date: Tue, 25 Jun 2002 13:45:58 -0500
Message-ID: <20020625184558.GA11367@wolff.to> (raw)
In-Reply-To: <9830.1025030116@sss.pgh.pa.us>
References: <20020625175828.GA11107@wolff.to>
	<9830.1025030116@sss.pgh.pa.us>

On Tue, Jun 25, 2002 at 14:35:16 -0400,
  Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Bruno Wolff III <bruno@wolff.to> writes:
> > 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.
> 
> The standard answer is to make a custom function that accepts all the
> columns and produces a result you can index.
> 
> This is sort of an academic "an existence proof is good enough" answer,
> but it *is* possible to get the results you want.  Making it more
> convenient hasn't risen to the top of anyone's to-do list.

It probably isn't worth the trouble in this case. The number of rows is small
and I will use a unique index without forcing a case independpent comparison.
For the time being this is good enough.

Thanks for confirming that I was reading the manually correctly.





view thread (5+ messages)  latest in thread

Message-ID: <20020625184558.GA11367@wolff.to>
Permalink:  ../20020625184558.GA11367@wolff.to/
Also on:    postgresql.org/message-id/20020625184558.GA11367@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bruno@wolff.to
  Subject: Re: unique index on function and column
  In-Reply-To: <20020625184558.GA11367@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox