aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/plpython.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/plpython.sgml')
-rw-r--r--doc/src/sgml/plpython.sgml29
1 files changed, 25 insertions, 4 deletions
diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml
index 6ec19c6e8ea..2de2e746b5f 100644
--- a/doc/src/sgml/plpython.sgml
+++ b/doc/src/sgml/plpython.sgml
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/plpython.sgml,v 1.16 2003/04/07 01:29:25 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/plpython.sgml,v 1.17 2003/06/30 18:31:41 tgl Exp $ -->
<chapter id="plpython">
<title>PL/Python - Python Procedural Language</title>
@@ -14,9 +14,21 @@
<para>
To install PL/Python in a particular database, use
- <literal>createlang plpython <replaceable>dbname</></literal>.
+ <literal>createlang plpythonu <replaceable>dbname</></literal>.
</para>
+ <note>
+ <para>
+ As of <productname>PostgreSQL</productname> 7.4,
+ PL/Python is only available as an <quote>untrusted</> language
+ (meaning it does not offer any way of restricting what users
+ can do in it). It has therefore been renamed to <literal>plpythonu</>.
+ The trusted variant <literal>plpython</> may become available again in
+ future, if a new secure execution mechanism is developed by the Python
+ community.
+ </para>
+ </note>
+
<tip>
<para>
If a language is installed into <literal>template1</>, all subsequently
@@ -41,7 +53,7 @@
<programlisting>
CREATE FUNCTION myfunc(text) RETURNS text
AS 'return args[0]'
- LANGUAGE plpython;
+ LANGUAGE plpythonu;
</programlisting>
gets transformed into
@@ -78,6 +90,8 @@ def __plpython_procedure_myfunc_23456():
available to all Python functions within a session. Use with care.
</para>
+<!-- NOT CORRECT ANYMORE, IS IT?
+
<para>
Each function gets its own restricted execution object in the
Python interpreter, so that global data and function arguments from
@@ -85,6 +99,9 @@ def __plpython_procedure_myfunc_23456():
<function>myfunc2</function>. The exception is the data in the
<varname>GD</varname> dictionary, as mentioned above.
</para>
+
+-->
+
</sect1>
<sect1 id="plpython-trigger">
@@ -218,11 +235,13 @@ CREATE FUNCTION usesavedplan() RETURNS trigger AS '
plan = plpy.prepare("SELECT 1")
SD["plan"] = plan
# rest of function
-' LANGUAGE plpython;
+' LANGUAGE plpythonu;
</programlisting>
</para>
</sect1>
+<!-- NOT CURRENTLY SUPPORTED
+
<sect1 id="plpython-trusted">
<title>Restricted Environment</title>
@@ -245,4 +264,6 @@ CREATE FUNCTION usesavedplan() RETURNS trigger AS '
</para>
</sect1>
+-->
+
</chapter>