Re: pl/perl function life and variable scope - concurrency problem?

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: pl/perl function life and variable scope - concurrency problem?
Дата
Msg-id 87fzgtwceh.fsf@asmodeus.mcnaught.org
обсуждение исходный текст
Ответ на pl/perl function life and variable scope - concurrency problem?  (Christopher Murtagh <christopher.murtagh@mcgill.ca>)
Ответы Re: pl/perl function life and variable scope - concurrency  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-general
Christopher Murtagh <christopher.murtagh@mcgill.ca> writes:

>  Thanks to a lot of help on this list, I've managed to get my pl/perl
> function working. However, I have an unexpected result. Here's a simple
> way to reproduce this problem:
>
> CREATE or REPLACE FUNCTION perltest(integer)
> returns integer as '
>   $MyInt = $MyInt + 1;
>   return $MyInt;
> ' language plperlu;

There's a reason Perl has "my" variables.  Use them.  ;)

-Doug

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

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: Column Sizes
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: SQL-question: returning the id of an insert querry