From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ivan Panchenko <wao(at)mail(dot)ru> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Re[2]: jsonb_plperl bug |
Date: | 2019-08-04 18:08:39 |
Message-ID: | 12780.1564942119@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
=?UTF-8?B?SXZhbiBQYW5jaGVua28=?= <wao(at)mail(dot)ru> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> 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 cleaner. I suppose we could get rid of the switch()
but it would result in a bigger diff for not much reason.
>> (My underlying concern here is mostly about whether we have other
>> similar bugs. There are a lot of places checking SvTYPE.)
> I looked through plperl.c, but found no similar cases of checking SvTYPE.
Yeah, at least there are no other places explicitly checking for
SVt_NULL.
Pushed with minor fiddling with the test case. Thanks!
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Michail Nikolaev | 2019-08-04 18:13:46 | Re: Optimize single tuple fetch from nbtree index |
Previous Message | Tomas Vondra | 2019-08-04 17:30:04 | Re: pglz performance |