Search Postgresql Archives

PlPerl scope issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After upgrade to 8.4.1 Perl “my” variables are no longer being seen by subroutines:

 

 CREATE OR REPLACE FUNCTION global.perl_test()

  RETURNS "varchar" AS

$BODY$

 

my $test="x";

 

test();

 

return $test;

 

sub test {

 elog(NOTICE,"X=".$test);

}

 

$BODY$

language 'plperlu';

 

Now, “select global.perl_test()” returns “x” but the value is missing from notice statement. This worked just fine in 8.3, and Perl scoping rules say ‘my’ variables are visible by subroutines within the same code block. I’m running Ubuntu Karmic, installed from stock PG repositories. Whats going on here?

 

Peter

 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux