Re: BUG #1831: plperl gives error after reconnect. - Mailing list pgsql-bugs

From Michael Fuhr
Subject Re: BUG #1831: plperl gives error after reconnect.
Date
Msg-id 20050820052957.GA48423@winnie.fuhr.org
Whole thread Raw
In response to Re: BUG #1831: plperl gives error after reconnect.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #1831: plperl gives error after reconnect.
List pgsql-bugs
On Sat, Aug 20, 2005 at 01:14:02AM -0400, Tom Lane wrote:
> One thing I was kind of wondering about (this will betray the fact
> that I haven't really studied Perl since it was Perl 4) is what are
> the namespace issues for ::mksafefunc?  In particular, could the
> inner invocation of foo() be executing in some context that makes
> the original definition of mksafefunc inaccessible?  And why, if
> we are careful to declare mksafefunc with ::, don't we call it
> with :: too?

You might be on to something there.  I just changed line 683 in
plperl.c to the following:

    count = perl_call_pv((trusted ? "::mksafefunc" : "::mkunsafefunc"),

My test cases now succeed where they had been failing.  But if
that's the problem, why are your systems behaving differently?

--
Michael Fuhr

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1831: plperl gives error after reconnect.
Next
From: Michael Fuhr
Date:
Subject: Re: BUG #1831: plperl gives error after reconnect.