Procedural Languages in Postgres
Procedural languages enable us to add flow control to functions and procedures, facilitating effective transaction management within these procedures. Keep in mind that PostgreSQL functions cannot control transactions; they run entirely within the transaction of the statement that invoked them. Only procedures can define transactions, initiate rollbacks, or define subtransactions. Refer to the Transactions and Subtransactions section for details on transaction management using PL/pgSQL.PostgreSQL supports a multitude of procedural languages. Some of the procedural languages are included with most PostgreSQL distributions and can easily be added through the ADD EXTENSION command:
- PL/pgSQL – the original procedural language for PostgreSQL
- PL/Tcl – a powerful string processing language
- PL/Perl – uses the Perl programming language to write stored procedures and functions
- PL/Python3u – gives developers access to Python 3 to write...