Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
eb892102
Commit
eb892102
authored
Apr 30, 2020
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make SQL/JSON error code names match SQL standard
see also
a00c53b0
parent
7462c1d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/backend/utils/adt/jsonpath_exec.c
src/backend/utils/adt/jsonpath_exec.c
+2
-2
src/backend/utils/errcodes.txt
src/backend/utils/errcodes.txt
+1
-1
No files found.
src/backend/utils/adt/jsonpath_exec.c
View file @
eb892102
...
...
@@ -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."
))));
...
...
src/backend/utils/errcodes.txt
View file @
eb892102
...
...
@@ -207,7 +207,7 @@ Section: Class 22 - Data Exception
2200S E ERRCODE_INVALID_XML_COMMENT invalid_xml_comment
2200T E ERRCODE_INVALID_XML_PROCESSING_INSTRUCTION invalid_xml_processing_instruction
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
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment