Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0597931

Browse files
committed
Added a few paragraphs to explain current restricted execution environment,
and error handling behavior.Bradley McLean
1 parent0042933 commit0597931

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

‎doc/src/sgml/plpython.sgml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/plpython.sgml,v 1.5 2001/11/12 19:19:39 petere Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/plpython.sgml,v 1.6 2001/11/20 21:09:53 momjian Exp $ -->
22

33
<chapter id="plpython">
44
<title>PL/Python - Python Procedural Language</title>
@@ -10,6 +10,28 @@
1010
<para>
1111
This chapter is not fully developed yet.
1212
</para>
13+
<para>
14+
The current version of PL/Python functions as a trusted language only;
15+
access to the filesystem and other local resources are disabled.
16+
Specifically, PL/Python uses the Python restricted execution environment,
17+
further restricts it to prevent the use of the file open call, and
18+
allows only modules from a specific list to be imported. Presently,
19+
that list includes: array, bisect, binascii, calendar, cmath, codecs,
20+
errno, marshal, math, md5, mpz, operator, pcre, pickle, random, re,
21+
regex, sre, sha, string, StringIO, struct, time, whrandom, and zlib.
22+
</para>
23+
<para>
24+
There is discussion on creating an untrusted language variant for a
25+
future release.
26+
</para>
27+
<para>
28+
In the current version, any postgresql error encountered while running
29+
a PL/Python function will result in the immediate termination of that
30+
function by the backend. It is not possible to trap error conditions
31+
using Python try ... catch constructs. For example, a syntax error in
32+
an SQL statement passed to the plpy.execute() call will terminate the
33+
function. This behavior may be changed in a future release.
34+
</para>
1335
</note>
1436

1537
<sect1 id="plpython-install">

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp