From eb892102e01a2073df9250d65e33ec1ed21798df Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 30 Apr 2020 09:34:54 +0200 Subject: Make SQL/JSON error code names match SQL standard see also a00c53b0cb --- src/backend/utils/adt/jsonpath_exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/jsonpath_exec.c') 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.")))); -- cgit v1.2.3