pgsql: Prevent infinity and NaN in jsonb/plperl transform - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Prevent infinity and NaN in jsonb/plperl transform
Date
Msg-id E1fDCX9-0005yu-7q@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Remove Windows module-list-dumping code.
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Don't do logical replication of TRUNCATE of zero tables