mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
Make SQL/JSON error code names match SQL standard
see also a00c53b0cb
This commit is contained in:
parent
7462c1d78c
commit
eb892102e0
@ -1791,7 +1791,7 @@ executeDateTimeMethod(JsonPathExecContext *cxt, JsonPathItem *jsp,
|
|||||||
|
|
||||||
if (!(jb = getScalar(jb, jbvString)))
|
if (!(jb = getScalar(jb, jbvString)))
|
||||||
RETURN_ERROR(ereport(ERROR,
|
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",
|
errmsg("jsonpath item method .%s() can only be applied to a string",
|
||||||
jspOperationName(jsp->type)))));
|
jspOperationName(jsp->type)))));
|
||||||
|
|
||||||
@ -1879,7 +1879,7 @@ executeDateTimeMethod(JsonPathExecContext *cxt, JsonPathItem *jsp,
|
|||||||
|
|
||||||
if (res == jperNotFound)
|
if (res == jperNotFound)
|
||||||
RETURN_ERROR(ereport(ERROR,
|
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\"",
|
errmsg("datetime format is not recognized: \"%s\"",
|
||||||
text_to_cstring(datetime)),
|
text_to_cstring(datetime)),
|
||||||
errhint("Use a datetime template argument to specify the input data format."))));
|
errhint("Use a datetime template argument to specify the input data format."))));
|
||||||
|
@ -207,7 +207,7 @@ Section: Class 22 - Data Exception
|
|||||||
2200S E ERRCODE_INVALID_XML_COMMENT invalid_xml_comment
|
2200S E ERRCODE_INVALID_XML_COMMENT invalid_xml_comment
|
||||||
2200T E ERRCODE_INVALID_XML_PROCESSING_INSTRUCTION invalid_xml_processing_instruction
|
2200T E ERRCODE_INVALID_XML_PROCESSING_INSTRUCTION invalid_xml_processing_instruction
|
||||||
22030 E ERRCODE_DUPLICATE_JSON_OBJECT_KEY_VALUE duplicate_json_object_key_value
|
22030 E ERRCODE_DUPLICATE_JSON_OBJECT_KEY_VALUE duplicate_json_object_key_value
|
||||||
22031 E ERRCODE_INVALID_ARGUMENT_FOR_JSON_DATETIME_FUNCTION invalid_argument_for_json_datetime_function
|
22031 E ERRCODE_INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION invalid_argument_for_sql_json_datetime_function
|
||||||
22032 E ERRCODE_INVALID_JSON_TEXT invalid_json_text
|
22032 E ERRCODE_INVALID_JSON_TEXT invalid_json_text
|
||||||
22033 E ERRCODE_INVALID_SQL_JSON_SUBSCRIPT invalid_sql_json_subscript
|
22033 E ERRCODE_INVALID_SQL_JSON_SUBSCRIPT invalid_sql_json_subscript
|
||||||
22034 E ERRCODE_MORE_THAN_ONE_SQL_JSON_ITEM more_than_one_sql_json_item
|
22034 E ERRCODE_MORE_THAN_ONE_SQL_JSON_ITEM more_than_one_sql_json_item
|
||||||
|
Loading…
x
Reference in New Issue
Block a user