Обсуждение: BUG #5277: plperl can't get args properly
The following bug has been logged online:
Bug reference: 5277
Logged by: louis
Email address: louis01010100@gmail.com
PostgreSQL version: 8.4.2
Operating system: PostgreSQL 8.4.2 on x86_64-pc-linux-gnu, compiled by GCC
gcc-4.4.real (Ubuntu 4.4.1-4ubuntu8) 4.4.1, 64-bit
Description: plperl can't get args properly
Details:
Arguments can't be passed to a plperl function
function definition:
====================
create or replace function foo(text) returns text as $$
return $_[0];
$$ language plperl;
test:
=====
select foo('a');
result:
=======
INFO:
foo
-----
(1 row)
"louis" <louis01010100@gmail.com> writes:
> Arguments can't be passed to a plperl function
[ scratches head... ] Works for everybody else. I have to suppose
there's something broken about your libperl, or plperl somehow got
built wrong. How did you build or come by your copies of perl and
postgresql?
regards, tom lane
On Thu, Jan 14, 2010 at 04:06, louis <louis01010100@gmail.com> wrote: > Arguments can't be passed to a plperl function Yeah, this is a bug with safe 2.20 :( see -http://rt.perl.org/rt3/Ticket/Display.html?id=72068 I would either try out this fix: http://github.com/timbunce/Safe/commits/master. Or downgrade to 2.19 for now: $ cpan cpan> install RGARCIA/Safe-2.19.tar.gz ....
Tom Lane <tgl@sss.pgh.pa.us> writes:
> "louis" <louis01010100@gmail.com> writes:
> > Arguments can't be passed to a plperl function
>=20
> [ scratches head... ] Works for everybody else. I have to suppose
> there's something broken about your libperl, or plperl somehow got
> built wrong. How did you build or come by your copies of perl and
> postgresql?
This is the issue I asked about on -hackers last month, and which I finally=
tracked down yesterday to a bug in Safe.pm 2.20. Tim Bunce has since fixed=
it. Report here:
http://rt.perl.org/rt3/Public/Bug/Display.html?id=3D72068
In the short run, you can downgrade to Safe.pm 2.19 and the problem will go=
away. Or just use PL/Perlu, which doesn't rely on Safe.pm.
Best,
David