Re: Question: unique on multiple columns - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Question: unique on multiple columns
Date
Msg-id 20030206212553.GE21780@wolff.to
Whole thread Raw
In response to Re: Question: unique on multiple columns  (will trillich <will@serensoft.com>)
Responses Re: Question: unique on multiple columns  (will trillich <will@serensoft.com>)
List pgsql-general
On Thu, Feb 06, 2003 at 10:33:51 -0600,
  will trillich <will@serensoft.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.

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Pg_dumpall problem[2]
Next
From: Tom Lane
Date:
Subject: Re: Cannot insert a duplicate key into unique index pg_calss_oid_index