Re: another plperl bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: another plperl bug
Дата
Msg-id 18139.1101155906@sss.pgh.pa.us
обсуждение исходный текст
Ответ на another plperl bug  ("Andrew Dunstan" <andrew@dunslane.net>)
Список pgsql-hackers
"Andrew Dunstan" <andrew@dunslane.net> writes:
> I discovered a further plperl bug last night. If foo() is a SRF and
> therefore returns an arrayref, calling select foo() rather than select *
> from foo() causes a segfault because this line passes NULL as the argument:

>     tupdesc = CreateTupleDescCopy(rsinfo->expectedDesc);

While looking into this I discovered another serious shortcoming: the
code was using static variables to process SETOF results, which of
course would break completely in any query involving more than one
plperl SETOF function.  I also realized that the ret_hv code we were
concerned about was actually dead code, because there's a test further
up that insists that the Perl result be an array when the function is
declared to return set.  So I wiped out that whole code path, for a nice
improvement in code size and legibility...
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: another plperl bug
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: 64Bit Solaris Compile