Post Content
See what generated columns being virtual by default means in Postgres 18. Paolo Melchiorre (PSF Fellow) walks through examples in his talk “PostgreSQL Generated Columns by Example” at POSETTE: An Event for Postgres 2026. Abstract: PostgreSQL generated columns are a powerful feature, and recent releases have significantly expanded what they can do. With PostgreSQL 18, generated columns are now virtual by default, while still allowing stored behavior, introducing new trade-offs around performance, storage, and query behavior.
In this talk, we explore PostgreSQL generated columns *by example*, using concrete, practical scenarios to understand how they behave and when they are a good fit. We will look at how generated columns evolved across PostgreSQL versions, what problems they solve well, and where careful design is still required.
To ground these examples in real-world usage, the talk uses Django as a concrete case study of how PostgreSQL generated columns are exposed and used through a widely adopted Python framework. This helps show how database features are actually used in production, and how ORM abstractions influence their adoption.
The talk also reflects recent improvements in Django 6.0 that better align with PostgreSQL’s generated column behavior. Attendees will leave with a clear mental model, practical examples, and guidance on when to use virtual versus stored generated columns in real systems.
Paolo Melchiorre is a Python backend developer, Django contributor, Python Software Foundation Fellow and Django Software Foundation Director.
► Video chapters:
⏩ 00:00 – Music & introduction
⏩ 00:25 – What generated columns really are
⏩ 01:33 – Speaker background & Django context
⏩ 03:14 – Why compute logic in the database
⏩ 05:00 – From idea to Django 5.0 feature
⏩ 07:02 – Generatedfield internals explained
⏩ 08:30 – Circle demo: auto-calculating area
⏩ 10:51 – Item & order examples: totals and status
⏩ 14:34 – JSON fields, performance, and benchmarks
⏩ 19:00 – Advanced use cases: search, GIS & beyond
▶️ 22:10 – GeoDjango, spatial fields, and real-world use
▶️ 25:00 – Key benefits and final takeaways
📕 Everything you need to know about POSETTE: An Event for Postgres can be found at: https://posetteconf.com
✅ Learn more: watch more POSETTE talks: https://aka.ms/posette-playlist
📌 Let’s connect:
LinkedIn: https://www.linkedin.com/company/posetteconf/
X – @PosetteConf, https://x.com/PosetteConf
Mastodon – @posetteconf, https://mastodon.social/@posetteconf
Bluesky – @posetteconf.com, https://aka.ms/posette-on-bluesky
#PosetteConf #PostgreSQL #database Read More Microsoft Developer