Re: BUG #14121: Constraint UNIQUE

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: m(dot)giraldo(at)stt-telefonia(dot)it
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14121: Constraint UNIQUE
Date: 2016-04-29 15:59:26
Message-ID: CAKFQuwY0Ytq5B8S4WHaE2H6+NJt=rVy7B2eM9fHqsXGV2jJomA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Apr 29, 2016 at 3:35 AM, <m(dot)giraldo(at)stt-telefonia(dot)it> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 14121
> Logged by: Marco
> Email address: m(dot)giraldo(at)stt-telefonia(dot)it
> PostgreSQL version: 9.5.0
> Operating system: Windows 7
> Description:
>
> Hi
> I have a problem with UNIQUE constraint.
> I don't understand the difference from TYPE type UNIQUE(when I declare a
> column of the table) and ALTER TABLE table ADD CONSTRAINT column UNIQUE
> (column).
> How can I remove the UNIQUE option from TYPE declaration?
>

​You might want to try re-phrasing your question.

Specification of a constraint within the column specification of CREATE
TABLE is optional. If you don't want to do it there, don't.

​There is no difference between specifying a single-column constraint on
the column definition or as a table constraint.

I'd suggest you upgrade to 9.5.2 - and 9.5.3 in a couple of weeks.

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2016-04-29 18:33:32 Re: streaming replication master can fail to shut down
Previous Message John McKown 2016-04-29 14:47:29 Re: BUG #14121: Constraint UNIQUE