I think (from squinting at the code) that in Django 1.2 m2m field updates now use the object save code to add relationships even where there aren't specifically defined intermediate classes, whereas previously the code did its own insert in such cases. So as a consequence last_insert_id gets called as part of those m2m field updates in cases where it previously didn't.
Because the table names for the m2m fields are generated from the class name and the field name together there is scope for them to be quite long and to hit the identifier limits and thus under postgresql the sequence name auto-generated for the id will not confirm to what the code currently guesses it to be (as per #8901) and so there'll be an error on updating m2m fields with 1.2 and postgresql in cases where there is a long enough field and class name and where it worked fine in 1.1. I've hit this myself on updating to 1.2. As #8901 hasn't been touched in a year (and has been sitting around since 2008) I thought I'd have a look at it myself. I've not submitted patches or tests for Django before, but I've had a stab at both for #8901. I'm not sure how to get this issue moved along closer to having a fix incorporated - it could certainly do with someone more expert than me in django and with postgresql knowledge reviewing my patch and tests (I've not flagged the issue has "has tests" as I skipped adding a test for one change for reasons I've noted on the issue, although maybe I should flag it thus). Regards, Matt -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.