Re: Plperl functions not re-entrant, wrong results - Mailing list pgsql-bugs

From David Fetter
Subject Re: Plperl functions not re-entrant, wrong results
Date
Msg-id 20070430164642.GD20549@fetter.org
Whole thread Raw
In response to Re: Plperl functions not re-entrant, wrong results  (Kenneth Downs <ken@secdat.com>)
List pgsql-bugs
On Mon, Apr 30, 2007 at 12:12:11PM -0400, Kenneth Downs wrote:
> Tom Lane wrote:
> >Kenneth Downs <ken@secdat.com> writes:
> >
> >>Here is a test case to show that plperl functions are not re-entrant.
> >>
> >
> >I'm very bad in perl, but I think you need to declare all your variables
> >with "my" to make them local instead of global.
> >
> >            regards, tom lane
>
> Thanks Tom, that did it!  I had one "my" in there, but there was another
> spot where one was needed.

There's a setting you can set in your postgresql.conf that will help
you find these problems more automatically:

custom_variable_classes = 'plperl'
plperl.use_strict = true

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate

pgsql-bugs by date:

Previous
From: "Phil Criley"
Date:
Subject: BUG #3258: Password fails, RPM installs in wrong directory
Next
From: Tom Lane
Date:
Subject: Re: BUG #3258: Password fails, RPM installs in wrong directory