On Fri, Jul 23, 2010 at 10:17, Milen <m...@avangardsolutions.com> wrote:
>
> The following bug has been logged online:
>
> Bug reference:      5570
> Logged by:          Milen
> Email address:      m...@avangardsolutions.com
> PostgreSQL version: v9.0beta2
> Operating system:   Linux
> Description:        global hash %_SHARED does not work in the new version
> Details:
>
> Hello,
> We can't find the global hash %_SHARED in the new version of plperl.c.

Huh, can we get more info? are you using plperl or plperlu?  A
complete testcase would also help.

It works for me:
=> SELECT version();
                                                    version
----------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.0beta3 on x86_64-unknown-linux-gnu, compiled by GCC gcc
(GCC) 4.5.0 20100610 (prerelease), 64-bit

=> create or replace function perl_shared() returns void as $$
elog(INFO, $_SHARED{'stuff'});
$_SHARED{'stuff'} = '1';
for my $k (keys %_SHARED)
{
    elog(INFO, $k);
}
$$ language plperl;

=> select perl_shared();
INFO:
CONTEXT:  PL/Perl function "perl_shared"
INFO:  stuff
CONTEXT:  PL/Perl function "perl_shared"
 perl_shared
-------------

(1 row)

=> select perl_shared();
INFO:  1
CONTEXT:  PL/Perl function "perl_shared"
INFO:  stuff
CONTEXT:  PL/Perl function "perl_shared"
 perl_shared
-------------

(1 row)

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to