From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Prevent infinity and NaN in jsonb/plperl transform
Date: Mon, 30 Apr 2018 17:24:15 +0000
Message-ID: <E1fDCX9-0005yu-7q@gemulon.postgresql.org> (raw)
Prevent infinity and NaN in jsonb/plperl transform
jsonb uses numeric internally, and numeric can store NaN, but that is
not allowed by jsonb on input, so we shouldn't store it. Also prevent
infinity to get a consistent error message. (numeric input would reject
infinity anyway.)
Reported-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e348e7ae5727a6da8678036d748e5c5af7deb6c9
Modified Files
--------------
contrib/jsonb_plperl/expected/jsonb_plperl.out | 24 ++++++++++++++++++++++--
contrib/jsonb_plperl/expected/jsonb_plperlu.out | 24 ++++++++++++++++++++++--
contrib/jsonb_plperl/jsonb_plperl.c | 16 ++++++++++++++--
contrib/jsonb_plperl/sql/jsonb_plperl.sql | 22 ++++++++++++++++++++++
contrib/jsonb_plperl/sql/jsonb_plperlu.sql | 22 ++++++++++++++++++++++
5 files changed, 102 insertions(+), 6 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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: peter_e@gmx.net, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform
In-Reply-To: <E1fDCX9-0005yu-7q@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