Upserts, sequences, and generated keys
Inserting-or-updating atomically with ON CONFLICT, the race condition it prevents, and choosing between auto-increment IDs and UUIDs.
10 min readUpdated 2026-09-04sqlupsertprimary-keysuuidadvanced
Inserting-or-updating atomically with ON CONFLICT, the race condition it prevents, and choosing between auto-increment IDs and UUIDs.