I agree! Also, does this already happen for the MySQL backend? MySQL has the insert on conflict update, that could work the same way. However, if I'm not wrong, the docs states that the above methods have a race condition (obvious since right now it does two operations), but if the code would actually use native database operations, the race conditions might be gone for those cases, so that should probably be documented as well.
El viernes, 8 de enero de 2016, 21:13:26 (UTC-3), bliy...@rentlytics.com escribió: > > Hey Guys, > > Postgres 9.5 has added the functionality for UPSERT aka update or insert. > Any interest in aligning UPSERT on the db layer with the get_or_create or > update_or_create functionality in django? Sounds like my company would be > interested in doing the work if the PR will get the traction. > > -Ben > -- 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 https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/ae38ba8e-3e79-47fb-92b9-dd305176c58e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.