Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteb89210

Browse files
committed
Make SQL/JSON error code names match SQL standard
see alsoa00c53b
1 parent7462c1d commiteb89210

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎src/backend/utils/adt/jsonpath_exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ executeDateTimeMethod(JsonPathExecContext *cxt, JsonPathItem *jsp,
17911791

17921792
if (!(jb=getScalar(jb,jbvString)))
17931793
RETURN_ERROR(ereport(ERROR,
1794-
(errcode(ERRCODE_INVALID_ARGUMENT_FOR_JSON_DATETIME_FUNCTION),
1794+
(errcode(ERRCODE_INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION),
17951795
errmsg("jsonpath item method .%s() can only be applied to a string",
17961796
jspOperationName(jsp->type)))));
17971797

@@ -1879,7 +1879,7 @@ executeDateTimeMethod(JsonPathExecContext *cxt, JsonPathItem *jsp,
18791879

18801880
if (res==jperNotFound)
18811881
RETURN_ERROR(ereport(ERROR,
1882-
(errcode(ERRCODE_INVALID_ARGUMENT_FOR_JSON_DATETIME_FUNCTION),
1882+
(errcode(ERRCODE_INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION),
18831883
errmsg("datetime format is not recognized: \"%s\"",
18841884
text_to_cstring(datetime)),
18851885
errhint("Use a datetime template argument to specify the input data format."))));

‎src/backend/utils/errcodes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ Section: Class 22 - Data Exception
207207
2200S E ERRCODE_INVALID_XML_COMMENT invalid_xml_comment
208208
2200T E ERRCODE_INVALID_XML_PROCESSING_INSTRUCTION invalid_xml_processing_instruction
209209
22030 E ERRCODE_DUPLICATE_JSON_OBJECT_KEY_VALUE duplicate_json_object_key_value
210-
22031 EERRCODE_INVALID_ARGUMENT_FOR_JSON_DATETIME_FUNCTION invalid_argument_for_json_datetime_function
210+
22031 EERRCODE_INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTIONinvalid_argument_for_sql_json_datetime_function
211211
22032 E ERRCODE_INVALID_JSON_TEXT invalid_json_text
212212
22033 E ERRCODE_INVALID_SQL_JSON_SUBSCRIPT invalid_sql_json_subscript
213213
22034 E ERRCODE_MORE_THAN_ONE_SQL_JSON_ITEM more_than_one_sql_json_item

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp