Re: [Plperlng-devel] strange bug in plperl

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [Plperlng-devel] strange bug in plperl
Дата
Msg-id 2996.24.211.141.25.1089115763.squirrel@www.dunslane.net
обсуждение исходный текст
Список pgsql-hackers
Thanks. I have 2 questions regarding this.

1. Is prodesc->fn_retistuple true if and only if this is a set returning
function? (what about setof int? what about a function returning a single
composite?)

2. I am suspicious about the use of these globals to stash data (and they
should all be marked static in any case so we don't pollute the namespace)
and already have it on my TODO list to examine them more closely. Won't they
get clobbered if our function makes an spi call which in turn calls this or
another perl function? If they will, we might need to use some sort of very
simple stack structure for this data, up to some reasonable level of
recursion (any bids?).


cheers

andrew



Sergej Sergeev said:
> Atached patch fix this bug
>
> Serg
>
>
> Andrew Dunstan wrote:
>
>>
>> Can anyone suggest why I might be seeing this effect (each notice
>> comes out once per row plus once per function call)
>>
>> thanks
>>
>> andrew
>>
>> andrew=# create function tstset() returns setof tst language plperl as
>> $$ andrew$# elog(NOTICE,"tstset called");
>> andrew$# return [{i=>1,v=>"one"},{i=>2,v=>"two"}];
>> andrew$# $$;
>> CREATE FUNCTION
>> andrew=# select * from tstset();
>> NOTICE:  tstset called
>> NOTICE:  tstset called
>> NOTICE:  tstset called
>> i |  v ---+-----
>> 1 | one
>> 2 | two
>> (2 rows)
>>
>> _______________________________________________
>> Plperlng-devel mailing list
>> Plperlng-devel@pgfoundry.org
>> http://pgfoundry.org/mailman/listinfo/plperlng-devel





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

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: More thoughts on drop tablespace
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Quick question regarding tablespaces