ls lib/postgres/

PostgreSQL for the people who write the queries

lib / PostgreSQL for the people who write the queries

PostgreSQL from the query side: SELECT and joins through window functions, JSONB, transactions, indexes, EXPLAIN, partitioning and row-level security. Small datasets, step-through figures and SQL you can edit and run in the page.

A course for people who write SQL against PostgreSQL: application developers, analysts, anyone who reads query results for a living. It covers what the database does from the query side, from a plain SELECT to window functions, JSONB, isolation levels, indexes, EXPLAIN and row-level security. It does not cover how PostgreSQL is built inside (storage, the executor, WAL); that is a separate course.

It assumes you have written a SELECT with a WHERE and a JOIN before. Every lesson uses a small dataset in its page. The examples show output recorded with psql against PostgreSQL 19.0, and you can edit and run each one in the page, in a copy of PostgreSQL 19.0 compiled to WebAssembly.

Querying

Analytical queries

Richer data

Keeping data correct

Performance from the query side

Logic and access in the database