diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2020-07-11 03:20:46 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2020-07-11 03:21:53 +0300 |
commit | 3ec5f6b53dfb6acfe66a952edef1b6887da91777 (patch) | |
tree | d1ce088ce64dd8dcf8d0f8cc18764dee27b36c8c /src/test/regress/sql/jsonb_jsonpath.sql | |
parent | a5f18e8c2180ccfff07380efe52f93e9491dd9b5 (diff) |
Improve error reporting for jsonpath .double() method
When jsonpath .double() method detects that numeric or string can't be
converted to double precision, it throws an error. This commit makes these
errors explicitly express the reason of failure.
Discussion: https://postgr.es/m/CAPpHfdtqJtiSXkP7tOXez18NxhLUH_-75bL8%3DOce4Ki%2Bbv7V6Q%40mail.gmail.com
Author: Alexander Korotkov
Reviewed-by: Tom Lane
Backpatch-through: 12
Diffstat (limited to 'src/test/regress/sql/jsonb_jsonpath.sql')
-rw-r--r-- | src/test/regress/sql/jsonb_jsonpath.sql | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/regress/sql/jsonb_jsonpath.sql b/src/test/regress/sql/jsonb_jsonpath.sql index ae8549d5536..7a65c6caeba 100644 --- a/src/test/regress/sql/jsonb_jsonpath.sql +++ b/src/test/regress/sql/jsonb_jsonpath.sql @@ -312,6 +312,7 @@ select jsonb_path_query('{}', '$.double()', silent => true); select jsonb_path_query('1.23', '$.double()'); select jsonb_path_query('"1.23"', '$.double()'); select jsonb_path_query('"1.23aaa"', '$.double()'); +select jsonb_path_query('1e1000', '$.double()'); select jsonb_path_query('"nan"', '$.double()'); select jsonb_path_query('"NaN"', '$.double()'); select jsonb_path_query('"inf"', '$.double()'); |