pgsql: Improve error reporting for jsonpath .double() method - Mailing list pgsql-committers

From Alexander Korotkov
Subject pgsql: Improve error reporting for jsonpath .double() method
Date
Msg-id E1ju3Kc-00013r-Os@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0657181167467ec5cfb5a28aacf47ca02f5f4588

Modified Files
--------------
src/backend/utils/adt/jsonpath_exec.c        | 4 ++--
src/test/regress/expected/jsonb_jsonpath.out | 8 +++++---
src/test/regress/sql/jsonb_jsonpath.sql      | 1 +
3 files changed, 8 insertions(+), 5 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Doc: update or remove dead external links.
Next
From: Alexander Korotkov
Date:
Subject: pgsql: Forbid numeric NaN in jsonpath