↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Procedural Languages

plpython3u

PL/Python3U untrusted procedural language

Reading PG 18·Select a recorded version

Kind
Bundled procedural-language variant
Family
PL/Python
Trusted
f
Handler
plpython3_call_handler
Inline handler
plpython3_inline_handler
Validator
plpython3_validator
Library
$libdir/plpython3
Default version
1.0
Module pathname
$libdir/plpython3
Comment
PL/Python3U untrusted procedural language
aliases
Unknown
manual path
/docs/18/plpython.html
signature
Unknown

Definition PG 18

Chapter 44. PL/Python — Python Procedural Language

The PL/Python procedural language allows PostgreSQL functions and procedures to be written in the Python language.

To install PL/Python in a particular database, use CREATE EXTENSION plpython3u.

Tip

If a language is installed into template1, all subsequently created databases will have the language installed automatically.

PL/Python is only available as an “untrusted” language, meaning it does not offer any way of restricting what users can do in it and is therefore named plpython3u. A trusted variant plpython might become available in the future if a secure execution mechanism is developed in Python. The writer of a function in untrusted PL/Python must take care that the function cannot be used to do anything unwanted, since it will be able to do anything that could be done by a user logged in as the database administrator. Only superusers can create functions in untrusted languages such as plpython3u.

Note

Users of source packages must specially enable the build of PL/Python during the installation process. (Refer to the installation instructions for more information.) Users of binary packages might find PL/Python in a separate subpackage.

Compare versions

Complete source facts

attributes

{"comment":"PL/Python3U untrusted procedural language","default_version":"1.0","family":"PL/Python","handler":"plpython3_call_handler","inline_handler":"plpython3_inline_handler","kind":"Bundled procedural-language variant","library":"$libdir/plpython3","module_pathname":"$libdir/plpython3","trusted":"f","validator":"plpython3_validator"}

source files

{"src/pl/plpython/plpython3u--1.0.sql":"7c4588b4f1176b3bbec5f5b3fd851931fda88652ee3b3985cde4f88d75b11a65","src/pl/plpython/plpython3u.control":"efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114"}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f

Text language: en · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f