PL/Python allows you to write functions in the Python programming language that may be used in SQL queries as if they were built into Postgres. The PL/Python intepreter is a full Python interpreter. PL/Python is currently only available as an "untrusted" language (meaning it does not offer any way of restricting what users can do in it). It has therefore been named "plpythonu". The trusted variant plpython may become available again in future, if a new secure execution mechanism is developed in Python.
17 lines
688 B
Text
17 lines
688 B
Text
===========================================================================
|
|
$NetBSD: MESSAGE,v 1.1.1.1 2005/08/06 06:25:12 jlam Exp $
|
|
|
|
Please see the PL/Python section of the PostgreSQL Programmer's Guide
|
|
(databases/postgresql-docs) for information on programming with
|
|
${PKGNAME}.
|
|
|
|
Note that PL/Python is unrestricted language, meaning it does not
|
|
offer any way of restricting what users can do in it. Any DB user with
|
|
access to PL/Python can run arbitrary Python code under privileges
|
|
of the PostgreSQL server process.
|
|
|
|
To enable PL/Python for database <dbname>, run following:
|
|
|
|
createlang plpythonu <dbname>
|
|
|
|
===========================================================================
|