Re: strange bug in plperl

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: strange bug in plperl
Дата
Msg-id 40E981B0.6040707@dunslane.net
обсуждение исходный текст
Ответ на Re: strange bug in plperl  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: strange bug in plperl
Список pgsql-hackers

Tom Lane wrote:

>Andrew Dunstan <andrew@dunslane.net> writes:
>  
>
>>Can anyone suggest why I might be seeing this effect (each notice comes 
>>out once per row plus once per function call)
>>    
>>
>
>It looks like you're executing the whole function body once per physical
>call, which is certainly not a good plan for a function returning set.
>Once you get to the RETURN statement, you probably want to stash away
>the array value and then just return elements of it on successive calls,
>without reexecuting any user code.
>
>
>  
>

Yep. I had come to that conclusion.

cheers

andrew


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: strange bug in plperl
Следующее
От: Andrew Dunstan
Дата:
Сообщение: plperl security