~/talk

PostgreSQL Generated Columns by Example

Talkat POSETTE: An Event for Postgres 2026 · 2026-06-16..06-18· [databases]
slides:none on file

PostgreSQL 18 makes generated columns virtual by default, letting reads compute values on demand while older stored columns persist results; benchmarks shown use Django models and local timings and report orders-of-magnitude faster reads for common cases. Examples include JSON version extraction, full‑text search vectors (workaround for immutability via Case/When), GeoDjango/PostGIS area and length calculations, and simple numeric or concatenation fields. Implementation uses Django’s GeneratedField in Django 5.0 and relies on the DB — no triggers, no Python — and generally reduces storage at the cost of read CPU.

AI-written summary · about

  1. 0:00Music & introduction
  2. 0:25What generated columns really are
  3. 1:33Speaker background & Django context
  4. 3:14Why compute logic in the database
  5. 5:00From idea to Django 5.0 feature
  6. 7:02Generatedfield internals explained
  7. 8:30Circle demo: auto-calculating area
  8. 10:51Item & order examples: totals and status
  9. 14:34JSON fields, performance, and benchmarks
  10. 19:00Advanced use cases: search, GIS & beyond
  11. 22:10GeoDjango, spatial fields, and real-world use
  12. 25:00Key benefits and final takeaways
~/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.