Re: Curious plperl behavior - Mailing list pgsql-general

From Tom Lane
Subject Re: Curious plperl behavior
Date
Msg-id 251.1267047251@sss.pgh.pa.us
Whole thread Raw
In response to Re: Curious plperl behavior  (Richard Huxton <dev@archonet.com>)
Responses Re: Curious plperl behavior  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Richard Huxton <dev@archonet.com> writes:
> On 24/02/10 20:55, Tom Lane wrote:
>> but if plperl is doing something that contributes to this, maybe it
>> requires documentation.

> It is documented.

> http://www.postgresql.org/docs/8.4/static/plperl-funcs.html

>      Note:  The use of named nested subroutines is dangerous in Perl,
> especially if they refer to lexical variables in the enclosing scope.
> Because a PL/Perl function is wrapped in a subroutine, any named
> subroutine you create will be nested. In general, it is far safer to
> create anonymous subroutines which you call via a coderef. See the
> perldiag man page for more details.

Hmm.  Jeff found some relevant material on perlref.  Should that link be
added?  Should the link(s) be more specific than telling you to read the
whole d*mn man page?  Neither of those pages are short, and each contains
a wealth of material that isn't related to this issue.

            regards, tom lane

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Curious plperl behavior
Next
From: Christine Penner
Date:
Subject: Re: Cast char to number