From 4ac0f450b698442c3273ddfe8eed0e1a7e56645f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 16 Sep 2021 14:48:52 +0200 Subject: Message style improvements --- src/backend/utils/adt/jsonbsubs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/backend/utils/adt/jsonbsubs.c') diff --git a/src/backend/utils/adt/jsonbsubs.c b/src/backend/utils/adt/jsonbsubs.c index 47a89457dbe..0d160259d02 100644 --- a/src/backend/utils/adt/jsonbsubs.c +++ b/src/backend/utils/adt/jsonbsubs.c @@ -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 -- cgit v1.2.3