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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pl/perl function life and variable scope - concurrency problem?
Дата
Msg-id 20031112202502.GJ30587@dcc.uchile.cl
обсуждение исходный текст
Ответ на pl/perl function life and variable scope - concurrency problem?  (Christopher Murtagh <christopher.murtagh@mcgill.ca>)
Список pgsql-general
On Wed, Nov 12, 2003 at 03:05:34PM -0500, Christopher Murtagh wrote:

> CREATE or REPLACE FUNCTION perltest(integer)
> returns integer as '
>   $MyInt = $MyInt + 1;
>   return $MyInt;
> ' language plperlu;

Use a local variable:

 CREATE or REPLACE FUNCTION perltest(integer)
 returns integer as '
   my $MyInt = $MyInt + 1;
   return $MyInt;
 ' language plperlu;

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"The problem with the future is that it keeps turning into the present"
(Hobbes)

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: SQL-question: returning the id of an insert querry
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: [HACKERS] Proposal for a cascaded master-slave replication system