pgsql: Prevent infinity and NaN in jsonb/plperl transform
От | Peter Eisentraut |
---|---|
Тема | pgsql: Prevent infinity and NaN in jsonb/plperl transform |
Дата | |
Msg-id | E1fDCX9-0005yu-7q@gemulon.postgresql.org обсуждение исходный текст |
Ответы |
Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform
|
Список | 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 по дате отправления: