aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonpath_exec.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2020-04-30 09:34:54 +0200
committerPeter Eisentraut <peter@eisentraut.org>2020-04-30 09:34:54 +0200
commiteb892102e01a2073df9250d65e33ec1ed21798df (patch)
treecef6c494637eef23d656c561670e1162f88f9f7d /src/backend/utils/adt/jsonpath_exec.c
parent7462c1d78cd8bc1cfca352cef0e3e234b9d3b62b (diff)
downloadpostgresql-eb892102e01a2073df9250d65e33ec1ed21798df.tar.gz
postgresql-eb892102e01a2073df9250d65e33ec1ed21798df.zip
Make SQL/JSON error code names match SQL standard
see also a00c53b0cb
Diffstat (limited to 'src/backend/utils/adt/jsonpath_exec.c')
-rw-r--r--src/backend/utils/adt/jsonpath_exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c
index bc063061cf2..135025cf570 100644
--- a/src/backend/utils/adt/jsonpath_exec.c
+++ b/src/backend/utils/adt/jsonpath_exec.c
@@ -1791,7 +1791,7 @@ executeDateTimeMethod(JsonPathExecContext *cxt, JsonPathItem *jsp,
if (!(jb = getScalar(jb, jbvString)))
RETURN_ERROR(ereport(ERROR,
- (errcode(ERRCODE_INVALID_ARGUMENT_FOR_JSON_DATETIME_FUNCTION),
+ (errcode(ERRCODE_INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION),
errmsg("jsonpath item method .%s() can only be applied to a string",
jspOperationName(jsp->type)))));
@@ -1879,7 +1879,7 @@ executeDateTimeMethod(JsonPathExecContext *cxt, JsonPathItem *jsp,
if (res == jperNotFound)
RETURN_ERROR(ereport(ERROR,
- (errcode(ERRCODE_INVALID_ARGUMENT_FOR_JSON_DATETIME_FUNCTION),
+ (errcode(ERRCODE_INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION),
errmsg("datetime format is not recognized: \"%s\"",
text_to_cstring(datetime)),
errhint("Use a datetime template argument to specify the input data format."))));