aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/indexcmds.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2020-09-30 18:25:23 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2020-09-30 18:25:23 -0300
commitf669ba7bdb009c0ed5335aedc632c928c97b38af (patch)
tree9a805b338dd180fff7f8bc8cd8854f45e60dca1f /src/backend/commands/indexcmds.c
parentc5232dca8d1bbe1cab4a2d6773566ff53146340b (diff)
downloadpostgresql-f669ba7bdb009c0ed5335aedc632c928c97b38af.tar.gz
postgresql-f669ba7bdb009c0ed5335aedc632c928c97b38af.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/commands/indexcmds.c')
-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 460f429b411..b4b9256de9e 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -940,8 +940,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))));