Expression index
An index on the result of an expression or function rather than on a column directly. CREATE INDEX ON users (lower(email)) makes WHERE lower(email) = ... fast. Also called a functional index.
Use case: case-insensitive search (lower()), indexing a JSONB field ((data->>'country')), computed keys (date_trunc('day', created_at)). Requirement: the expression must be IMMUTABLE (deterministic — now() won't work). The query must use exactly the same expression as the index for the planner to use it. Trade-off: the index is recomputed on every write. Distinct from a generated column (which materializes the value in a real column) — an expression index only stores the indexed result. Common for avoiding redundant columns.