PL/Python
A procedural language enabling PostgreSQL functions to be written in Python
PL/Python
is a procedural language enabling PostgreSQL functions to be written in Python.
PL/Python
was added in PostgreSQL 7.2. It is one of the four procedural languages provided as part of the core distribution (the others being PL/pgSQL
, PL/Perl
and PL/Tcl
).
Change history
Work-in-progress
- PostgreSQL 15
- support for Python 2 removed (initial commit 19252e8e)
- PostgreSQL 10
- support for multi-dimensional arrays in function arguments added (commit 94aceed3)
- PostgreSQL 9.4
- PostgreSQL
numeric
values now converted to Pythondecimal
(commit 7919398b)
- PostgreSQL
- PostgreSQL 9.3
- result object string handler added (commit 330ed4ac)
OID
values now converted to a proper Python numeric type (commit db0af74a)- SPIErrors raised directly and treated in the same as an SPIError generated internally (commit 316186f2)
- support for building against custom Python installations on OS X (commit fc874507)
- PostgreSQL 9.1
- PostgreSQL 9.0
- PostgreSQL 7.3
- various API improvements
- PostgreSQL 7.2
- added (initial commit 0bef7ba5)
References
- PostgreSQL documentation: PL/Python - Python Procedural Language
Useful links
- Getting Started with Postgres Functions in PL/Python - August 2020 blog article from Crunchy Data
- Postgres Data Types in PL/Python - September 2020 blog article from Crunchy Data
Categories
See also
PL/pgSQL, PL/Perl, PL/Tcl, jsonb_plpython, hstore_plpython, ltree_plpython