12 · Databases & SQL
Upsert
Insert or update in one step
A write that inserts a row if it does not exist, or updates it if it does—avoiding a separate check-then-write race.
Concrete example
`INSERT … ON CONFLICT DO UPDATE` in Postgres is an upsert.
Why it matters
Agents reach for this constantly when syncing records by id.