Prevent infinity and NaN in jsonb/plperl transform

Peter Eisentraut <peter_e@gmx.net>

Commit: e348e7ae5727a6da8678036d748e5c5af7deb6c9
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2018-04-30T17:22:57Z
Releases: 11.0
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>

Files