aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonbsubs.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2021-09-16 14:48:52 +0200
committerPeter Eisentraut <peter@eisentraut.org>2021-09-16 15:36:58 +0200
commitf46dc96fcc652d5c29343e0eb4fa8e86a9468c36 (patch)
tree7229938ffa85dec3874d350ba20f456ba641eed9 /src/backend/utils/adt/jsonbsubs.c
parent7890a423470b3a763aa22faf69a44cb6a2df8f0e (diff)
downloadpostgresql-f46dc96fcc652d5c29343e0eb4fa8e86a9468c36.tar.gz
postgresql-f46dc96fcc652d5c29343e0eb4fa8e86a9468c36.zip
Message style improvements
Diffstat (limited to 'src/backend/utils/adt/jsonbsubs.c')
-rw-r--r--src/backend/utils/adt/jsonbsubs.c9
1 files changed, 4 insertions, 5 deletions
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