AntiPattern
Multirow RETURN in Functions
scalar-context-multirow-return
Set-returning SQL is accidentally used inside scalar PL/pgSQL contexts (e.g., RETURN/ PERFORM with a WITH SELECT), so PostgreSQL either throws type cardinality errors or forces a single-value constraint, breaking age/score computations.