#8901: Django's guessed postgresql sequence name is incorrect if the resulting sequence name is longer than max_identifier_length ---------------------------------------------------+------------------------ Reporter: a...@zuerchertech.com | Owner: nobody Status: new | Milestone: Component: Database layer (models, ORM) | Version: SVN Resolution: | Keywords: postgresql Stage: Accepted | Has_patch: 1 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 1 | ---------------------------------------------------+------------------------ Changes (by russellm):
* needs_better_patch: 0 => 1 * needs_tests: 1 => 0 Comment: @Skaffen - I've attached a slightly cleaned up patch (mostly style changes for consistency, like naming of tables, reusing existing models, and trimming some comments). I've also slightly changed the flush tests -- it turns out that calling flush is an extremely expensive operation when you have a full test suite. We've just gone through the process of removing a half a dozen calls to flush, and halved the time it takes to run the full test suite as a result. So -- I've modified the test to exercise the bits of the flush that matter from the point of view of this patch. Other than those relatively minor changes, your patch looks good. However, there's one issue preventing me from committing this to trunk: When you run the tests with this patch applied, there is an error raised during test setup: {{{ ... Installing index for admin.LogEntry model Installing index for backends.VeryLongModelNameZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ_m2m_also_quite_long_zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz model Failed to install index for backends.VeryLongModelNameZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ_m2m_also_quite_long_zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz model: relation "backends_verylongmodelnamezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzf21a" already exists }}} I'm guessing that this is some sort of confusion relating to the fact that the very long table and the very long m2m table have the same truncated name, or possibly that the key names on those tables are being truncated. This setup error cause any tests to fail, but I'm hesitant to commit a patch that causes a visible error during test setup unless there's an unavoidable reason for it. I can't see an obvious cause, so I'll throw it back to you for some deeper analysis. -- Ticket URL: <http://code.djangoproject.com/ticket/8901#comment:11> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.