pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve error reporting for jsonpath .double() method
Date: Sat, 11 Jul 2020 00:25:30 +0000
Message-ID: <E1ju3Kc-00013r-Os@gemulon.postgresql.org> (raw)

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(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1ju3Kc-00013r-Os@gemulon.postgresql.org>
Permalink:  ../E1ju3Kc-00013r-Os@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ju3Kc-00013r-Os@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: akorotkov@postgresql.org
  Subject: Re: pgsql: Improve error reporting for jsonpath .double() method
  In-Reply-To: <E1ju3Kc-00013r-Os@gemulon.postgresql.org>
  References: <E1ju3Kc-00013r-Os@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox