Re: pl/perl function life and variable scope - concurrency - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: pl/perl function life and variable scope - concurrency
Date
Msg-id 3FB29BB8.4090001@commandprompt.com
Whole thread Raw
In response to Re: pl/perl function life and variable scope - concurrency problem?  (Doug McNaught <doug@mcnaught.org>)
Responses Re: pl/perl function life and variable scope -
List pgsql-general
Or in other words... code to "strict"

J


Doug McNaught wrote:

>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
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: the planner will ignore your desire to choose an index scan if your
>      joining column's datatypes do not match
>
>

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-222-2783 - jd@commandprompt.com - http://www.commandprompt.com
Editor-N-Chief - PostgreSQl.Org - http://www.postgresql.org



pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: SQL-question: returning the id of an insert querry
Next
From: Jan Wieck
Date:
Subject: Re: Proposal for a cascaded master-slave replication system