Re: BUG #3415: plperl spi_exec_prepared variable undef value confusion
В списке pgsql-bugs по дате отправления:
| От | Andrew Dunstan |
|---|---|
| Тема | Re: BUG #3415: plperl spi_exec_prepared variable undef value confusion |
| Дата | |
| Msg-id | 4683E7ED.7040305@dunslane.net обсуждение исходный текст |
| Ответ на | Re: BUG #3415: plperl spi_exec_prepared variable undef value confusion (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-bugs |
Tom Lane wrote: > "Matt" <matt@lindenelevator.com> writes: > >> Description: plperl spi_exec_prepared variable undef value confusion >> > > [ pokes at it ... ] Some of the places in plperl.c that are checking for > undef values use code like > > if (SvOK(val) && SvTYPE(val) != SVt_NULL) > > and some just test the SvTYPE part. It looks to me like the SvOK test > is essential --- in fact I'm not sure the SvTYPE test is even bringing > anything to the party. Any perl-extension gurus around here? > > > The perlapi docs explicitly state that one should always use SvOK() to check for undef. IIRC some SvOK() tests were added in some places where it was found to be necessary, and the old tests kept out of an abundance of caution, but a little googling suggests that you are correct. cheers andrew
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера