Epilogue — Sunrise Over the Tagus#
The next morning, 06:12. Warm Atlantic sunlight spills across the Lisbon lobby. Every elephant is snoring peacefully, the dashboard is green, and a fresh sticky note sits beside a warm pastel de nata.
Jumbo: Splendid night's rest! Not a single double booking, my loyalty points updated immediately, and my suitcase arrived intact.
Ferris: Twenty shifts, zero raw SQL strings, and look at pg_stat_statements — spotless.
Maya: Remember when the spreadsheet crashed under Bram? We've come a long way since 23:45.
Panda: Okay, okay — I deleted my for-loop script. Mostly.
Twenty chapters ago, Maya was handed a crashed spreadsheet and ninety seconds before Jumbo checked in. Look at everything you and Maya built on PostgreSQL and pgdorm:
- Act I (The First Night): Typed tables,
RETURNING,pg.UNSETpartial updates, PostgreSQLRETURNING OLD/NEW,UNNESTbulk inserts,= ANY($1),TypeTablelookups,TypeDecoratorcodecs,uuidv7(), virtual generated columns, and partial indexes. - Act II (Full House): Symmetric
JOIN … USING,JoinLintError, 2-RTTsplit_load(), PostgreSQLWITHOUT OVERLAPStemporal keys, STI & CTI inheritance without string discriminators, savepoints, advisory locks,FOR UPDATE SKIP LOCKED, and transactionalLISTEN/NOTIFY. - Act III (The Wi-Fi Era): Row-value keyset pagination with
EXPLAINassertions,LATERALJSONB nesting, 1-RTT pipelines withpg.currval(), compile-oncepg.prepare(),ReadPool, server-side portal streaming,ROLLUP/FILTER/QUALIFYanalytics, and typedWITH RECURSIVE(SEARCH/CYCLE) trees. - Act IV (Expansion): Ephemeral
pg_tempstaging fused withMERGE … RETURNINGin 1 RTT, PgBouncer-safe Row-Level Security vialocal_settings=, monthly range partitioning with proven pruning, and zero-copy Arrow relays linking PostgreSQL, Polars, and DuckDB. - Act V (Going Live): FastAPI routes derived straight from tables (
pg.Create[T],pg.Patch[T],pool.json()), online-safe schema evolution (CONCURRENTLY,NOT VALID/VALIDATE), and CI-enforced RTT and index tests.
Where to go next#
- Compare ORM architectures head-to-head in Field Note 1 · Unit of Work & Identity Map, contrasting stateful
AsyncSessionobject graphs withpgdorm's explicit 1-RTT model. - Dare Ferris after hours in The Zero-SQL Hall of Shame — six gnarly production PostgreSQL queries expressed in 100% typed Python and 1 RTT each.
- Jump back to any shift using the Story Map or check your reading progress badge.
- Inspect the full data model in the Schema Reference or look up any database term in the Glossary.
- See how this book stays 100% honest in Backstage, where every code block,
# =>output, and SQL transcript is wired to live PostgreSQL tests. - Start your own project using Before Your First Shift or Coming From Another ORM?.
← PreviousChapter 20 · Moby's Test LabChapter 20 · 1-RTT & Schema Test Lab