Re: BUG #5570: global hash %_SHARED does not work in the new version

From: Alex Hunsaker <badalex(at)gmail(dot)com>
To: Milen <mile(at)avangardsolutions(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5570: global hash %_SHARED does not work in the new version
Date: 2010-07-23 17:24:32
Message-ID: AANLkTi=6Y8UjTdnHv+KQtQO-mSMzvDqC3x30tThjHRxt@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Jul 23, 2010 at 10:17, Milen <mile(at)avangardsolutions(dot)com> wrote:
>
> The following bug has been logged online:
>
> Bug reference:      5570
> Logged by:          Milen
> Email address:      mile(at)avangardsolutions(dot)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)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2010-07-23 17:29:36 Re: BUG #5567: will not install
Previous Message Stefan Kaltenbrunner 2010-07-23 17:24:11 Re: BUG #5567: will not install