Re: Plperl functions not re-entrant, wrong results

From: David Fetter <david(at)fetter(dot)org>
To: Kenneth Downs <ken(at)secdat(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Plperl functions not re-entrant, wrong results
Date: 2007-04-30 16:46:43
Message-ID: 20070430164642.GD20549@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Apr 30, 2007 at 12:12:11PM -0400, Kenneth Downs wrote:
> Tom Lane wrote:
> >Kenneth Downs <ken(at)secdat(dot)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(at)fetter(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2007-04-30 16:58:39 Re: BUG #3258: Password fails, RPM installs in wrong directory
Previous Message Kenneth Downs 2007-04-30 16:12:11 Re: Plperl functions not re-entrant, wrong results