Re: Curious plperl behavior

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Jeff <threshar(at)threshar(dot)is-a-geek(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Curious plperl behavior
Date: 2010-02-24 21:34:11
Message-ID: 251.1267047251@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richard Huxton <dev(at)archonet(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christine Penner 2010-02-24 21:42:29 Re: Cast char to number
Previous Message Richard Huxton 2010-02-24 21:21:43 Re: Curious plperl behavior