Re: Question: unique on multiple columns

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Question: unique on multiple columns
Date: 2003-02-06 21:25:53
Message-ID: 20030206212553.GE21780@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 06, 2003 at 10:33:51 -0600,
will trillich <will(at)serensoft(dot)com> wrote:
>
> of course, my example is rather bogus -- as others pointed out,
> unique(a,c) means that there'll only be 1 b for any a/c pair, so
> the unique(b...) index is not-too-useful. it's just an
> illustration, and a bad one at that. ah, well...

If there are several different foreign key references into the table
using different combinations of a, b and c, you might need both indexes.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-02-06 21:25:55 Re: pg_temp schemas
Previous Message Bruno Wolff III 2003-02-06 21:23:03 Re: Pg_dumpall problem[2]