From 1d8a5f3bc35203642531d51e32d49eab7138781c Mon Sep 17 00:00:00 2001 From: NikolayS Date: Fri, 17 Mar 2017 06:55:06 +0300 Subject: [PATCH] violates unique constraint --> violates unique index, DOC --- doc/src/sgml/ref/insert.sgml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml index 521216b..b43ab23 100644 --- a/doc/src/sgml/ref/insert.sgml +++ b/doc/src/sgml/ref/insert.sgml @@ -447,7 +447,11 @@ INSERT INTO table_name [ AS Explicitly specifies an arbiter constraint by name, rather than inferring - a constraint or index. + a constraint or index. Note that CREATE UNIQUE INDEX + creates only a unique index, not a unique constraint. + ON CONFLICT ON CONSTRAINT for unique constraints + can be used only when such a constraint is defined explicity + using ALTER TABLE ... ADD UNIQUE CONSTRAINT. @@ -492,7 +496,11 @@ INSERT INTO table_name [ AS CREATE UNIQUE INDEX ... CONCURRENTLY - before dropping the index being replaced. + before dropping the index being replaced (moreover, + CREATE UNIQUE INDEX defines only a unique + index, not a unique constraint, and ON CONFLICT ON + CONSTRAINT cannot be used unless the corresponding + unique constraint is defined explicitly). -- 2.1.4