PL/Perl trusted throws error on example function

From: Frank Finner <postgresql(at)finner(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: PL/Perl trusted throws error on example function
Date: 2005-03-02 15:01:55
Message-ID: 20050302160155.723a14cb.postgresql@finner.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I tried to test plperl and got the following error with the very first
example from chapter 37:

CREATE OR REPLACE FUNCTION perlmax(integer,integer)
RETURNS integer AS $$
if ($_[0] > $_[1]) { return $_[0]; } return $_[1];
$$ LANGUAGE plperl;

--
error from Perl function: trusted Perl functions disabled - please
upgrade Perl Safe module to version 2.09 or later at (eval 4) line 1.
--

PostgreSQL is 8.0.1, System is SuSE 9.2 (64 bit) on AMD64. Perl Safe
module says, it__s version 2.11, which seems to be the latest release on
CPAN.

plperl is installed as "trusted". If I install it as plperlu
"untrusted", the example above works correctly.

What is so bad with this function that I only can run it untrusted?

Regards, Frank

--
Frank Finner

Invenius - Lösungen mit Linux
Köpfchenstraße 36
57072 Siegen
Telefon: 0271 231 8606 Mail: frank(dot)finner(at)invenius(dot)de
Telefax: 0271 231 8608 Web: http://www.invenius.de
Key fingerprint = 90DF FF40 582E 6D6B BADF 6E6A A74E 67E4 E788 2651

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wes 2005-03-02 15:46:46 Re: Vacuum time degrading
Previous Message Stephane Bortzmeyer 2005-03-02 14:43:13 [Auth] "ident" method and LDAP user accounts