ERROR: creation of Perl function failed: 'require' trapped by operation mask

E

Electrorog

Can anyone help me solve this error? I'm trying to write a function in
Postgres. I do not and cannot install the language plperlu as I am not
a superuser (thinking this may have to do with my problem).

CREATE FUNCTION send_email () RETURNS LANGUAGE plperl AS
$$use Mail::Sendmail;
%mail = (To =>'(e-mail address removed)',
From =>'(e-mail address removed)',
Subject =>'Test',
Message =>"Testing Testing 123\n);
sendmail(%mail) or die $Mail::Sendmail::error;
return;$$;

Thanks!
 
C

Ch Lamprecht

Can anyone help me solve this error? I'm trying to write a function in
Postgres. I do not and cannot install the language plperlu as I am not
a superuser (thinking this may have to do with my problem).

CREATE FUNCTION send_email () RETURNS LANGUAGE plperl AS
$$use Mail::Sendmail;
%mail = (To =>'(e-mail address removed)',
From =>'(e-mail address removed)',
Subject =>'Test',
Message =>"Testing Testing 123\n);
sendmail(%mail) or die $Mail::Sendmail::error;
return;$$;

Hi,
from postgres documentation:

37.5. Trusted and Untrusted PL/Perl

Normally, PL/Perl is installed as a "trusted" programming language named
plperl.
In this setup, certain Perl operations are disabled to preserve security.
In general, the operations that are restricted are those that interact
with the environment.
This includes file handle operations, require, and use (for external
modules).

HTH,
Christoph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top