aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
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:26:43 +0200
commit976b06c6630cbf09bf933a006b5e662753e7c0be (patch)
treef7bbb66f6a117149bd4e8e8f1804d859e96538eb /src/backend/executor
parentf58d7073b7750d58b5d53232f0d6a967f902b78f (diff)
downloadpostgresql-976b06c6630cbf09bf933a006b5e662753e7c0be.tar.gz
postgresql-976b06c6630cbf09bf933a006b5e662753e7c0be.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')
-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)