niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » PostgreSQL
PL/Perl trusted throws error on example function
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Author Message
Frank Finner
*nix forums beginner


Joined: 02 Mar 2005
Posts: 10

PostPosted: Wed Mar 02, 2005 2:01 pm    Post subject: PL/Perl trusted throws error on example function Reply with quote

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.finner@invenius.de
Telefax: 0271 231 8608 Web: http://www.invenius.de
Key fingerprint = 90DF FF40 582E 6D6B BADF 6E6A A74E 67E4 E788 2651
Back to top
Tom Lane
*nix forums Guru


Joined: 24 Mar 2005
Posts: 2070

PostPosted: Thu Mar 03, 2005 4:14 pm    Post subject: Re: PL/Perl trusted throws error on example function Reply with quote

Frank Finner <postgresql@finner.de> writes:
Quote:
error from Perl function: trusted Perl functions disabled - please
upgrade Perl Safe module to version 2.09 or later at (eval 4) line 1.

What do you get from
perl -e 'require Safe; print "$Safe::VERSION\n"'

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
Back to top
Frank Finner
*nix forums beginner


Joined: 02 Mar 2005
Posts: 10

PostPosted: Thu Mar 03, 2005 5:13 pm    Post subject: Re: PL/Perl trusted throws error on example function Reply with quote

Hi Tom,

I found an error right between my ears,

means, I had looked at the client__s version of Safe, not thinking
about the fact that I was connected to the database on a server which
actually had Safe installed only with version 2.07. I upgraded Safe now
from CPAN on my server and everything works fine now.

Thanks for your help, it opened my eyes.

Regards, Frank



On Thu, 03 Mar 2005 12:14:53 -0500 Tom Lane <tgl@sss.pgh.pa.us> thought
long, then sat down and wrote:

Quote:
Frank Finner <postgresql@finner.de> writes:
error from Perl function: trusted Perl functions disabled - please
upgrade Perl Safe module to version 2.09 or later at (eval 4) line
1.

What do you get from
perl -e 'require Safe; print "$Safe::VERSION\n"'

regards, tom lane

--
Frank Finner

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

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
The time now is Fri Jan 09, 2009 1:39 am | All times are GMT
navigation Forum index » Databases » PostgreSQL
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Postfix + MySQL error: very strange variable %s iWarior Postfix 0 Mon Aug 25, 2008 2:01 pm
No new posts ** Postfix error on console every minute or so ** ?? drywash Postfix 0 Fri Jul 04, 2008 8:49 pm
No new posts Postfix error bounce diwash Postfix 0 Fri Mar 28, 2008 3:37 am
No new posts I am getting following error in Aix 5.3 rockcharles1 AIX 0 Tue Aug 28, 2007 11:06 pm
No new posts postfix out of memory error - please help metind Postfix 0 Mon Sep 11, 2006 1:54 am

ADD Coaches | Free Advertising | Debt Consolidation | Debt Consolidation | Looking for Credit Cards?
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.4858s ][ Queries: 16 (0.3983s) ][ GZIP on - Debug on ]