Prevent infinity and NaN in jsonb/plperl transform
Peter Eisentraut <peter_e@gmx.net>
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
| Path | Change | +/− |
|---|---|---|
| contrib/jsonb_plperl/expected/jsonb_plperl.out | modified | +22 −2 |
| contrib/jsonb_plperl/expected/jsonb_plperlu.out | modified | +22 −2 |
| contrib/jsonb_plperl/jsonb_plperl.c | modified | +14 −2 |
| contrib/jsonb_plperl/sql/jsonb_plperl.sql | modified | +22 −0 |
| contrib/jsonb_plperl/sql/jsonb_plperlu.sql | modified | +22 −0 |