Re: BUG #14121: Constraint UNIQUE
| От | John McKown |
|---|---|
| Тема | Re: BUG #14121: Constraint UNIQUE |
| Дата | |
| Msg-id | CAAJSdjjYzrNQfKTodQSf85BV+ijxz1Y9QH6ghyO4aS30KYR=vA@mail.gmail.com обсуждение исходный текст |
| Ответ на | BUG #14121: Constraint UNIQUE (m.giraldo@stt-telefonia.it) |
| Список | pgsql-bugs |
On Fri, Apr 29, 2016 at 5:35 AM, <m.giraldo@stt-telefonia.it> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14121
> Logged by: Marco
> Email address: m.giraldo@stt-telefonia.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?
>
> Best reguards
>
=E2=80=8BALTER TABLE table DROP CONSTRAINT constraint_name;
Example:
# create table c(c text unique);
CREATE TABLE
# \d+ c
Table "public.c"
Column | Type | Modifiers | Storage | Stats target | Description
--------+------+-----------+----------+--------------+-------------
c | text | | extended | |
Indexes:
"c_c_key" UNIQUE CONSTRAINT, btree (c)
# alter table c drop constraint c_c_key;
ALTER TABLE
# \d+ c
Table "public.c"
Column | Type | Modifiers | Storage | Stats target | Description
--------+------+-----------+----------+--------------+-------------
c | text | | extended | |
=E2=80=8B
--=20
The unfacts, did we have them, are too imprecisely few to warrant our
certitude.
Maranatha! <><
John McKown
В списке pgsql-bugs по дате отправления: