Commit 79e66486 authored by Jan Wieck's avatar Jan Wieck

Added untrusted PL/TclU (pltclu) language. Executes all procedures

in a non-safe interpreter, so with full OS access! Language is
restricted to be used by DB superusers.

Added "argisnull n" and "return_null" commands to gain full control
over NULL values from new FMGR capabilities.

Jan
parent ec1ea529
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.12 2000/05/28 17:56:08 tgl Exp $ # $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.13 2000/07/19 11:53:02 wieck Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -183,15 +183,26 @@ case "$langname" in ...@@ -183,15 +183,26 @@ case "$langname" in
lancomp="PL/pgSQL" lancomp="PL/pgSQL"
trusted="TRUSTED " trusted="TRUSTED "
handler="plpgsql_call_handler" handler="plpgsql_call_handler"
object="plpgsql"
;; ;;
pltcl) pltcl)
lancomp="PL/Tcl" lancomp="PL/Tcl"
trusted="TRUSTED " trusted="TRUSTED "
handler="pltcl_call_handler";; handler="pltcl_call_handler"
object="pltcl"
;;
pltclu)
lancomp="PL/Tcl (untrusted)"
trusted=""
handler="pltclu_call_handler"
object="pltcl"
;;
plperl) plperl)
lancomp="PL/Perl" lancomp="PL/Perl"
trusted="TRUSTED " trusted="TRUSTED "
handler="plperl_call_handler";; handler="plperl_call_handler"
object="plperl"
;;
*) *)
echo "$CMDNAME: unsupported language '$langname'" echo "$CMDNAME: unsupported language '$langname'"
echo "Supported languages are 'plpgsql', 'pltcl', and 'plperl'." echo "Supported languages are 'plpgsql', 'pltcl', and 'plperl'."
...@@ -204,7 +215,7 @@ esac ...@@ -204,7 +215,7 @@ esac
# Check that the shared object for the call handler is installed # Check that the shared object for the call handler is installed
# in PGLIB # in PGLIB
# ---------- # ----------
if [ ! -f $PGLIB/${langname}__DLSUFFIX__ ]; then if [ ! -f $PGLIB/${object}__DLSUFFIX__ ]; then
echo "$CMDNAME: cannot find the file $PGLIB/${langname}__DLSUFFIX__" echo "$CMDNAME: cannot find the file $PGLIB/${langname}__DLSUFFIX__"
echo "" echo ""
echo "This file contains the call handler for $lancomp. By default," echo "This file contains the call handler for $lancomp. By default,"
...@@ -244,7 +255,7 @@ fi ...@@ -244,7 +255,7 @@ fi
# ---------- # ----------
# Create the call handler and the language # Create the call handler and the language
# ---------- # ----------
$PSQL "CREATE FUNCTION $handler () RETURNS OPAQUE AS '$PGLIB/${langname}__DLSUFFIX__' LANGUAGE 'newC'" $PSQL "CREATE FUNCTION $handler () RETURNS OPAQUE AS '$PGLIB/${object}__DLSUFFIX__' LANGUAGE 'newC'"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "$CMDNAME: language installation failed" echo "$CMDNAME: language installation failed"
exit 1 exit 1
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment