From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Forbid numeric NaN in jsonpath
Date: Sat, 11 Jul 2020 00:25:30 +0000
Message-ID: <E1ju3Kc-00013s-PM@gemulon.postgresql.org> (raw)
Forbid numeric NaN in jsonpath
SQL standard doesn't define numeric Inf or NaN values. It appears even more
ridiculous to support then in jsonpath assuming JSON doesn't support these
values as well. This commit forbids returning NaN from .double(), which was
previously allowed. NaN can't be result of inner-jsonpath computation over
non-NaNs. So, we can not expect NaN in the jsonpath output.
Reported-by: Tom Lane
Discussion: https://postgr.es/m/203949.1591879542%40sss.pgh.pa.us
Author: Alexander Korotkov
Reviewed-by: Tom Lane
Backpatch-through: 12
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/df646509f371069c65f84309eb5749642e8650b3
Modified Files
--------------
src/backend/utils/adt/jsonb_util.c | 8 --------
src/backend/utils/adt/jsonpath_exec.c | 15 ++++++++-------
src/test/regress/expected/jsonb_jsonpath.out | 12 ++----------
3 files changed, 10 insertions(+), 25 deletions(-)
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: Forbid numeric NaN in jsonpath
In-Reply-To: <E1ju3Kc-00013s-PM@gemulon.postgresql.org>
References: <E1ju3Kc-00013s-PM@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