On Sun, Sep 28, 2014 at 12:44 PM, Petite Abeille <petite.abei...@gmail.com> wrote: > I would be happier with a clean MERGE statement implementation in Postgres, > yes. And yes, I have followed Postgres' agonizing debate over the years about > the subject. But I personally think it has been framed in the wrong light > since the very beginning and that Postgres has convince itself that it > somehow cannot support MERGE. Therefore it will not.
I don't know where you've been getting your information from. I think Postgres can and should support MERGE too. MERGE isn't harder -- it's easier, because there is no need to prevent the kind of race conditions that you get described in the stack overflow thread I linked to. Oracle's docs describe MERGE as: "This statement is a convenient way to combine multiple operations. It lets you avoid multiple INSERT, UPDATE, and DELETE DML statements." And that's all it is! It's useful for bulk loading/data warehousing, mostly. I don't quite understand why many people think that MERGE is useful for implementing UPSERT. It isn't documented to do anything special in the face of concurrency. I think that there is an incredible amount of misinformation about this topic floating around. The various vendors that have a MERGE feature should have clearly indicated that MERGE isn't useful for implementing an UPSERT, but they didn't, and so the problem persists. -- 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 django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. 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/CAM3SWZSZGyFMK9zUt23Enf%3DhkvEEyWtc93N7tvvEon%2BMhPaV_g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.