aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/executor/execIndexing.c4
-rw-r--r--src/test/regress/output/constraints.source2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/executor/execIndexing.c b/src/backend/executor/execIndexing.c
index f42bd8f1fb8..72993297079 100644
--- a/src/backend/executor/execIndexing.c
+++ b/src/backend/executor/execIndexing.c
@@ -535,8 +535,8 @@ ExecCheckIndexConstraints(TupleTableSlot *slot,
if (!indexRelation->rd_index->indimmediate)
ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("ON CONFLICT does not support deferred unique constraints/exclusion constraints as arbiters"),
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("ON CONFLICT does not support deferrable unique constraints/exclusion constraints as arbiters"),
errtableconstraint(heapRelation,
RelationGetRelationName(indexRelation))));
diff --git a/src/test/regress/output/constraints.source b/src/test/regress/output/constraints.source
index 1c4a0440527..e6d31743804 100644
--- a/src/test/regress/output/constraints.source
+++ b/src/test/regress/output/constraints.source
@@ -643,7 +643,7 @@ INSERT INTO deferred_excl VALUES(1); -- fail
ERROR: conflicting key value violates exclusion constraint "deferred_excl_con"
DETAIL: Key (f1)=(1) conflicts with existing key (f1)=(1).
INSERT INTO deferred_excl VALUES(1) ON CONFLICT ON CONSTRAINT deferred_excl_con DO NOTHING; -- fail
-ERROR: ON CONFLICT does not support deferred unique constraints/exclusion constraints as arbiters
+ERROR: ON CONFLICT does not support deferrable unique constraints/exclusion constraints as arbiters
BEGIN;
INSERT INTO deferred_excl VALUES(2); -- no fail here
COMMIT; -- should fail here