PLPython
PL/Python is a procedural language extension for PostgreSQL that allows writing stored procedures and functions in the Python programming language. It embeds a Python interpreter inside the database server and provides access to PostgreSQL data and operations, enabling Python code to query and manipulate data through the server programming interface.
There are two main variants: trusted and untrusted. The untrusted variants (often named plpythonu or plpython3u)
To use PL/Python, you typically install the Python interpreter and the corresponding PostgreSQL extension, then enable
A simple example is: CREATE FUNCTION py_add(a integer, b integer) RETURNS integer AS $$ return a + b