From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Prevent infinity and NaN in jsonb/plperl transform |
Date: | 2018-04-30 17:24:15 |
Message-ID: | E1fDCX9-0005yu-7q@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)ilmari(dot)org>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2018-04-30 17:51:51 | pgsql: Don't do logical replication of TRUNCATE of zero tables |
Previous Message | Tom Lane | 2018-04-30 17:20:26 | pgsql: Remove Windows module-list-dumping code. |