]> granicus.if.org Git - postgresql/commit
Fix jsonb_plperl to convert Perl UV values correctly.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 18 Jun 2018 21:39:57 +0000 (17:39 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 18 Jun 2018 21:39:57 +0000 (17:39 -0400)
commit93b6e03ab4794272986a11a427c6c391eafa5dea
treed47064e64f9edbe30fdaacee3ba56c81d6b74147
parente3b7f7cc50630dac958a48b533cce04e4222892b
Fix jsonb_plperl to convert Perl UV values correctly.

Values greater than IV_MAX were incorrectly converted to SQL,
for instance ~0 would become -1 rather than 18446744073709551615
(on a 64-bit machine).

Dagfinn Ilmari MannsÃ¥ker, adjusted a bit by me

Discussion: https://postgr.es/m/d8jtvskjzzs.fsf@dalvik.ping.uio.no
contrib/jsonb_plperl/expected/jsonb_plperl.out
contrib/jsonb_plperl/expected/jsonb_plperlu.out
contrib/jsonb_plperl/jsonb_plperl.c
contrib/jsonb_plperl/sql/jsonb_plperl.sql
contrib/jsonb_plperl/sql/jsonb_plperlu.sql