One of PostgreSQL's best quality-of-life features is RETURNING * (or RETURNING id). Instead of running an INSERT followed by a separate SELECT to get the generated ID and timestamps, PostgreSQL returns the inserted row in one round trip!
ADVERTISEMENT