Re: Unique constraints and indexes.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Rogerson <steve(dot)pg(at)yewtc(dot)demon(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Unique constraints and indexes.
Date: 2016-01-05 19:47:30
Message-ID: 11612.1452023250@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Steve Rogerson <steve(dot)pg(at)yewtc(dot)demon(dot)co(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Rogerson 2016-01-05 20:02:13 Re: Unique constraints and indexes.
Previous Message balajishanmugam@live.in 2016-01-05 19:18:12 Postgresql 9.3 not coming up after restart in centos