From: | Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: ON CONFLICT with constraint name doesn't work |
Date: | 2017-03-16 20:08:53 |
Message-ID: | CANNMO++J-0XC74LdQvX83VfR+b_QV0VhAtz56E7atbydxrNRgg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Thu, Mar 16, 2017 at 12:40 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> A unique index isn't exactly the same as a unique constraint - you
> really need to create a constraint.
Then we probably need to fix this message?
[local]:5432 nikolay(at)test=# insert into constr (msg) values ('hohoho') ;
INSERT 0 1
[local]:5432 nikolay(at)test=# insert into constr (msg) values ('hohoho') ;
ERROR: duplicate key value violates unique constraint "i_constr_msg"
DETAIL: Key (md5(msg))=(8b0dc2e34844337434b8475108a490ab) already exists.
-- it tells us explicitly, that we have a *constraint* named "i_constr_msg".
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2017-03-16 20:23:59 | Re: ON CONFLICT with constraint name doesn't work |
Previous Message | Peter Geoghegan | 2017-03-16 19:51:18 | Re: ON CONFLICT with constraint name doesn't work |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-03-16 20:17:03 | Re: asynchronous execution |
Previous Message | Robert Haas | 2017-03-16 20:07:34 | Re: Parallel Append implementation |