1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +03:00

Message style improvements

This commit is contained in:
Peter Eisentraut
2021-09-16 14:48:52 +02:00
parent 3d7c752a2f
commit 4ac0f450b6
6 changed files with 17 additions and 22 deletions

View File

@@ -100,9 +100,8 @@ jsonb_subscript_transform(SubscriptingRef *sbsref,
if (targetType != UNKNOWNOID)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("subscript type is not supported"),
errhint("Jsonb subscript must be coerced "
"only to one type, integer or text."),
errmsg("subscript type %s is not supported", format_type_be(subExprType)),
errhint("jsonb subscript must be coercible to only one type, integer or text."),
parser_errposition(pstate, exprLocation(subExpr))));
targetType = targets[i];
@@ -115,8 +114,8 @@ jsonb_subscript_transform(SubscriptingRef *sbsref,
if (targetType == UNKNOWNOID)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("subscript type is not supported"),
errhint("Jsonb subscript must be coerced to either integer or text"),
errmsg("subscript type %s is not supported", format_type_be(subExprType)),
errhint("jsonb subscript must be coercible to either integer or text."),
parser_errposition(pstate, exprLocation(subExpr))));
}
else