aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execExprInterp.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-07-18 14:26:43 +0200
committerPeter Eisentraut <peter@eisentraut.org>2022-07-18 14:27:53 +0200
commitb681ca7635c4082c76f069d4d1dc2ca61975ca59 (patch)
treeee90a16f1ca414abfa0baefbb09663ed380fe55a /src/backend/executor/execExprInterp.c
parent96dbbf828c5f188e9fec0b706ad33c20900f918d (diff)
downloadpostgresql-b681ca7635c4082c76f069d4d1dc2ca61975ca59.tar.gz
postgresql-b681ca7635c4082c76f069d4d1dc2ca61975ca59.zip
Add another SQL/JSON error code
A code comment said that the standard does not define a number for ERRCODE_SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE, but this was fixed in a later draft version of the standard, so use that number now.
Diffstat (limited to 'src/backend/executor/execExprInterp.c')
-rw-r--r--src/backend/executor/execExprInterp.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c
index 9fcb6be414d..723770fda0e 100644
--- a/src/backend/executor/execExprInterp.c
+++ b/src/backend/executor/execExprInterp.c
@@ -4980,13 +4980,7 @@ ExecEvalJsonExpr(ExprEvalStep *op, ExprContext *econtext,
* type simply does not exist.
*/
ereport(ERROR,
-
- /*
- * XXX Standard says about a separate error code
- * ERRCODE_SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE but
- * does not define its number.
- */
- (errcode(ERRCODE_SQL_JSON_SCALAR_REQUIRED),
+ (errcode(ERRCODE_SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE),
errmsg("SQL/JSON item cannot be cast to target type")));
}
else if (!jcstate->estate)