Re: [BUGS] ON CONFLICT with constraint name doesn't work

Поиск
Список
Период
Сортировка
От Nikolay Samokhvalov
Тема Re: [BUGS] ON CONFLICT with constraint name doesn't work
Дата
Msg-id CANNMO++J-0XC74LdQvX83VfR+b_QV0VhAtz56E7atbydxrNRgg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUGS] ON CONFLICT with constraint name doesn't work  (Andres Freund <andres@anarazel.de>)
Ответы Re: [BUGS] ON CONFLICT with constraint name doesn't work
Список pgsql-bugs
On Thu, Mar 16, 2017 at 12:40 PM, Andres Freund <andres@anarazel.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@test=# insert into constr (msg) values ('hohoho') ;
INSERT 0 1

[local]:5432 nikolay@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".

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [BUGS] ON CONFLICT with constraint name doesn't work
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [BUGS] ON CONFLICT with constraint name doesn't work