On Sun, Sep 28, 2014 at 1:51 AM, Petite Abeille <[email protected]> wrote: > For diversity's sake, and for the record, I, for one, would definitively > rather have the standard MERGE statement instead of yet another 'weird' > UPSERT concoction peculiar to Postgres.
A few people have said that, but then when you look at SQL MERGE in detail it becomes apparent that it is really intended to serve the bulk loading use-case. I took the time to delineate the differences between SQL MERGE and what I call UPSERT in detail [1]. Both Oracle and SQL server have SQL MERGE implementations that promise nothing about atomicity or concurrency, and are known to have race conditions when used to implement even the simplest upsert-like operation. Certainly, the SQL standard has nothing to say about MERGE and concurrency. Teradata, SAP HANA and MySQL have UPSERT-ish features that make some guarantees, and they're both non-standard. [1] http://www.postgresql.org/message-id/flat/CAM3SWZRP0c3g6+aJ=yydgyactzg0xa8-1_fcvo5xm7hrel3...@mail.gmail.com#CAM3SWZRP0c3g6+aJ=yydgyactzg0xa8-1_fcvo5xm7hrel3...@mail.gmail.com -- Peter Geoghegan -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAM3SWZSiJUcipFqaM%2BXVm1dwNHDemRtQ33vWA93HiVbfFoKLKQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
