diff options
author | Bruce Momjian | 2001-06-18 21:40:06 +0000 |
---|---|---|
committer | Bruce Momjian | 2001-06-18 21:40:06 +0000 |
commit | 0ed7864d6872e0fd4e4df44db2a978ecaa16d8af (patch) | |
tree | 7c2ad4371f6e681339948c11bc5c0d0b658831b7 /src/bin/scripts/createlang.sh | |
parent | 558fae16e3d09afeb75a8a048ab750d559ff5848 (diff) |
Well, after persuading cvsup and cvs that it _is_ possible to have local
modifiable repositories, I have a clean untrusted plperl patch to offer
you :)
Highlights:
* There's one perl interpreter used for both trusted and untrusted
procedures. I do think its unnecessary to keep two perl
interpreters around. If someone can break out from trusted "Safe" perl
mode, well, they can do what they want already. If someone disagrees, I
can change this.
* Opcode is not statically loaded anymore. Instead, we load Dynaloader,
which then can grab Opcode (and anything else you can 'use') on its own.
* Checked to work on FreeBSD 4.3 + perl 5.5.3 , OpenBSD 2.8 + perl5.6.1,
RedHat 6.2 + perl 5.5.3
* Uses ExtUtils::Embed to find what options are necessary to link with
perl shared libraries
* createlang is also updated, it can create untrusted perl using 'plperlu'
* Example script (assuming you have Mail::Sendmail installed):
create function foo() returns text as '
use Mail::Sendmail;
%mail = ( To => q(you@yourname.com),
From => q(me@here.com),
Message => "This is a very short message"
);
sendmail(%mail) or die $Mail::Sendmail::error;
return "OK. Log says:\n", $Mail::Sendmail::log;
' language 'plperlu';
Alex Pilosov
Diffstat (limited to 'src/bin/scripts/createlang.sh')
-rw-r--r-- | src/bin/scripts/createlang.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bin/scripts/createlang.sh b/src/bin/scripts/createlang.sh index 83bf8b31114..7c4b959367a 100644 --- a/src/bin/scripts/createlang.sh +++ b/src/bin/scripts/createlang.sh @@ -7,7 +7,7 @@ # Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.27 2001/05/24 00:13:13 petere Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.28 2001/06/18 21:40:06 momjian Exp $ # #------------------------------------------------------------------------- @@ -210,6 +210,12 @@ case "$langname" in handler="plperl_call_handler" object="plperl" ;; + plperlu) + lancomp="PL/Perl (untrusted)" + trusted="" + handler="plperl_call_handler" + object="plperl" + ;; plpython) lancomp="PL/Python" trusted="TRUSTED " |