Re: jsonb_plperl bug

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

Ugh.  Doesn't Perl provide some saner way to determine the type of a SV?

The core code seems to think that SvOK() is a sufficient test for an
undef.  Should we be doing that before the switch, perhaps?

(My underlying concern here is mostly about whether we have other
similar bugs.  There are a lot of places checking SvTYPE.)

            regards, tom lane



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

Предыдущее
От: Ian Barwick
Дата:
Сообщение: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: The unused_oids script should have a reminder to use the8000-8999 OID range