Re: Re[2]: jsonb_plperl bug

2019-08-04 Thread Tom Lane
=?UTF-8?B?SXZhbiBQYW5jaGVua28=?= writes: > Tom Lane : >> The core code seems to think that SvOK() is a sufficient test for an >> undef. Should we be doing that before the switch, perhaps? > Thank you, Tom. Yes, there is a solution with SvOK(), please see the attached > patch. Yeah, that looks

Re[2]: jsonb_plperl bug

2019-08-03 Thread Ivan Panchenko
> Tom Lane : > >=?UTF-8?B?SXZhbiBQYW5jaGVua28=?= < w...@mail.ru > writes: >> I have found a bug in jsonb_plperl extension. A possible fix is proposed >> below. >> ... >> +/* SVt_PV without POK flag is also NULL */ >> +if(SvTYPE(in) == SVt_P

Re: jsonb_plperl bug

2019-08-02 Thread Tom Lane
=?UTF-8?B?SXZhbiBQYW5jaGVua28=?= writes: > I have found a bug in jsonb_plperl extension. A possible fix is proposed > below. > ... > + /* SVt_PV without POK flag is also NULL */ > + if(SvTYPE(in) == SVt_PV) Ugh. Doesn't Perl provide some

jsonb_plperl bug

2019-08-02 Thread Ivan Panchenko
Hi, I have found a bug in jsonb_plperl extension. A possible fix is proposed below. jsonb_perl is the contrib module, which defines TRANSFORM functions for jsonb data type and PL/Perl procedural language. The bug can be reproduced as follows: CREATE EXTENSION plperl; CREATE EXTENSION jsonb_pl