On Mon, 2014-09-29 at 11:11 -0600, Carl Meyer wrote: > Of course, it would be better for Django to reliably know index names. > Even though we don't currently, I'm hopeful that > https://github.com/django/deps/pull/6 may get us there by the time we > would be considering these changes anyway, which would address both your > #1 above, and the issues with create_or_update().
It will be a long time before we can be sure we know index names for all models. Currently Django supports usage of models with hand-edited or legacy database schemas. So, we have no knowledge of primary key index names for current Django projects. I am not sure how we could get into a point where we know index names of models without forcing users to always specify index names. Some alternative approaches: - We could introspect models for index names. - We could have "upsert_on_save" model ._meta flag, if set, then we assume the primary key index has the default name The main point is that having WITHIN PRIMARY KEY syntax would make usage of this feature a lot easier for us. - Anssi -- 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/1412062639.14923.123.camel%40TTY32. For more options, visit https://groups.google.com/d/optout.