Postgres upsert on duplicate and how other databases implement upsert | Hacker News Reader