PL/Python -- Python inside the PostgreSQL RDBMS
summary
PL/Python embeds Python into PostgreSQL with a single C file under 5,000 lines, maps SQL types to Python, and supports triggers, table-returning functions and improved syntax checking in 9.1. Examples include a GTIN domain check function enforcing barcode validity at insert, and a funds-transfer example using explicit subtransactions to record partial failures. Used in a POS deployment to parse 100+ messy supplier cases and to shift bulk work into the DB, yielding one-to-two orders of magnitude speedups.
AI-written summary · about
chapters (4)
- 0:00Start
- 8:31Enforcing a Site-Level Constraints
- 16:36Reasons Why We Want To Use Python
- 25:03Database as an Application Server
related talks
51mPostgres with Python inside and out: PL/Python
31mExtending SQL Databases with Python
24mDeveloping DB Extensions in Python: Examples for SQLite, DuckDB & PostgreSQL
29mDuckPL: A procedural language in DuckDB
45mPostgres and the Artificial Intelligence
40mDB for next project? Why, Postgres, of course
30mBuilding modern Python web apps with PostgreSQL
25mPostgres and the Artificial Intelligence Landscape
