Postgres upsert on duplicate and how other databases implement upsert · HackerTrans