1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

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
This commit is contained in:
Alvaro Herrera
2020-09-30 18:25:23 -03:00
parent 489c9c3407
commit 9fc2122712
2 changed files with 10 additions and 11 deletions

View File

@ -1002,8 +1002,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))));