aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2020-09-30 18:25:22 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2020-09-30 18:25:22 -0300
commit5b76e8fb675ee3619c569af2d42227b584d31215 (patch)
treece4457733f2334bcfd4233821245e75f5d88af80 /src/backend
parentb0fe0b022f80d6e0409b8fa412657eb8ea74a816 (diff)
downloadpostgresql-5b76e8fb675ee3619c569af2d42227b584d31215.tar.gz
postgresql-5b76e8fb675ee3619c569af2d42227b584d31215.zip
Reword partitioning error message
The error message about columns in the primary key not including all of the partition key was unclear; reword it. Backpatch all the way to pg11, where it appeared. Reported-by: Nagaraj Raj <nagaraj.sf@yahoo.com> Discussion: https://postgr.es/m/64062533.78364.1601415362244@mail.yahoo.com
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/commands/indexcmds.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 531a977fa0f..3424954594a 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -810,8 +810,7 @@ DefineIndex(Oid relationId,
key->partattrs[i] - 1);
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("insufficient columns in %s constraint definition",
- constraint_type),
+ errmsg("unique constraint on partitioned table must include all partitioning columns"),
errdetail("%s constraint on table \"%s\" lacks column \"%s\" which is part of the partition key.",
constraint_type, RelationGetRelationName(rel),
NameStr(att->attname))));