Re:Upsert anti-pattern in SQL Server
by castorp on Friday September 04, 2020 @04:13PM
(#24378451)
The Postgres team decided against implementing MERGE when they designed the ON CONFLICT feature (it actually started as a MERGE).
It's been a while, but as far as I remember, the main reason was that the behaviour of MERGE mandated by the SQL standard, wasn't clear enough and doesn't deal with race conditions when multiple transactions try the same insert (or update) (not so much the syntax itself).
It's been a while, but as far as I remember, the main reason was that the behaviour of MERGE mandated by the SQL standard, wasn't clear enough and doesn't deal with race conditions when multiple transactions try the same insert (or update) (not so much the syntax itself).