Re: Re[2]: jsonb_plperl bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re[2]: jsonb_plperl bug
Дата
Msg-id 12780.1564942119@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re[2]: jsonb_plperl bug  (Ivan Panchenko <wao@mail.ru>)
Список pgsql-hackers
=?UTF-8?B?SXZhbiBQYW5jaGVua28=?= <wao@mail.ru> writes:
> Tom Lane <tgl@sss.pgh.pa.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: pglz performance
Следующее
От: Michail Nikolaev
Дата:
Сообщение: Re: Optimize single tuple fetch from nbtree index