PL/Python is the procedural language for PostgreSQL that allows you to write database stored functions and triggers in Python. Python has proved to be a charming language and when used for where it excels, enhances the power of PostgreSQL quite nicely.
Unfortunately we can't quite capture all its charm in a single pager cheat sheet, but hopefully
this will give you a sense of its usefulness.
Below is a Thumbnail view of the PL\Python cheat sheet. This is by no means comprehensive, but are the features we thought may be useful to know.
PDF Portrait version 8.5 x 11" of this cheatsheet is available at PL/Python Cheatsheet 8.5 x 11 and also available in
PDF A4 format and HTML.
Also check out our accompanying tutorials on the topic of PL/Python:
- Quick Intro to PLPython
- PLPython Part 2: Control Flow and Returning Sets
- PLPython Part 3: Using custom classes, pulling data from PostgreSQL
- PLPython Part 4: PLPython meets aggregates