~/talk

Extending SQL Databases with Python

Talkat PyData Eindhoven 2025 · on Tuesday, 2025-12-09· at 13:25· Planck-Bohr· [databases, python]
slides:none on file

Shows how Python actually runs inside three databases—SQLite, DuckDB, PostgreSQL—by registering functions with sqlite3.create_function, building custom aggregates in DuckDB, and using PL/Python or embedding CPython in a PostgreSQL extension. Demonstrations include a Python moving‑average implemented as an SQL function, a correlation aggregate that calls SciPy, utilities like pgpdf and pdjq, and notes that Python3U is unsafe, virtualenvs are flaky, and the C+Python embedding approach works but adds complexity.

AI-written summary · about

  1. 0:00Introduction
  2. 0:27Why SQL meets Python matters
  3. 1:53ACID compliance and databases
  4. 3:19Procedural vs relational
  5. 4:23Pandas limits vs SQL benefits
  6. 5:25Why SQL works
  7. 6:30What extensions are
  8. 7:34Custom functions and types
  9. 8:37Powerful SQL extensions
  10. 10:08Extending PostgreSQL with Python
  11. 12:17PL/Python metadata and optimizer
  12. 13:00PL/Python examples
  13. 14:50itertools in SQL with Python
  14. 16:16Calling C from Python in PostgreSQL
  15. 17:44PL/Python considerations
  16. 18:26SQLite vs PostgreSQL for extensions
  17. 19:08Extending SQLite with Python
  18. 21:13DuckDB Python extensions
  19. 22:00Custom aggregates in DuckDB
  20. 23:04Correlation matrix example
  21. 25:15Advice for Python devs
  22. 27:21Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.