Search Postgresql Archives

Re: Unique constraints and indexes.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, January 5, 2016, Steve Rogerson <steve.pg@xxxxxxxxxxxxxxxxx> wrote:
On 05/01/16 19:47, Tom Lane wrote:
> Steve Rogerson <steve.pg@xxxxxxxxxxxxxxxxx> 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?


I suspect it has to do with partial unique indexes.

David J. 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux