Re: [BUGS] ON CONFLICT with constraint name doesn't work - Mailing list pgsql-bugs

From Andres Freund
Subject Re: [BUGS] ON CONFLICT with constraint name doesn't work
Date
Msg-id 20170316194050.ysgx2gnavxwivigk@alap3.anarazel.de
Whole thread Raw
In response to [BUGS] ON CONFLICT with constraint name doesn't work  (Nikolay Samokhvalov <samokhvalov@gmail.com>)
Responses Re: [BUGS] ON CONFLICT with constraint name doesn't work  (Nikolay Samokhvalov <samokhvalov@gmail.com>)
List pgsql-bugs
Hi,

On 2017-03-16 12:34:49 -0700, Nikolay Samokhvalov wrote:
> I'm trying to explicitly use the constraint name of my UNIQUE INDEX but it
> doesn't work (Postgres 9.6.2):
> 
> [local]:5432 nikolay@test=# create table constr(id serial, msg text);
> CREATE TABLE
> 
> [local]:5432 nikolay@test=# create unique index i_constr_msg on constr
> using btree(md5(msg));
> CREATE INDEX

A unique index isn't exactly the same as a unique constraint - you
really need to create a constraint.

- Andres


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Nikolay Samokhvalov
Date:
Subject: [BUGS] ON CONFLICT with constraint name doesn't work
Next
From: Heikki Linnakangas
Date:
Subject: Re: [BUGS] ON CONFLICT with constraint name doesn't work