Re: Unique constraints and indexes. - Mailing list pgsql-general

From Steve Rogerson
Subject Re: Unique constraints and indexes.
Date
Msg-id 568C2145.5060709@yewtc.demon.co.uk
Whole thread Raw
In response to Re: Unique constraints and indexes.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Unique constraints and indexes.
Re: Unique constraints and indexes.
List pgsql-general
On 05/01/16 19:47, Tom Lane wrote:
> Steve Rogerson <steve.pg@yewtc.demon.co.uk> writes:
>> Is this a bug? I create a "unique" index, directly but it doesn't add a unique
>> constraint. Add a unique constraint and it adds the index and the constraint.
>
> That's operating as designed.  A unique constraint needs an index,
> but not vice versa.


I can see that might be plausible , hence the question but as a "unique index"
imposes as constraint they seem equivalent. What's the functional difference
between the two situations?

Steve




pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unique constraints and indexes.
Next
From: "David G. Johnston"
Date:
Subject: Re: Unique constraints and indexes.