#8901: last_insert_id() for postgres fails when the autoincrement sequence name 
is
too long.
--------------------------------------------+-------------------------------
          Reporter:  [EMAIL PROTECTED]  |         Owner:  nobody
            Status:  new                    |     Milestone:        
         Component:  Database wrapper       |       Version:  1.0   
        Resolution:                         |      Keywords:        
             Stage:  Accepted               |     Has_patch:  1     
        Needs_docs:  0                      |   Needs_tests:  0     
Needs_better_patch:  0                      |  
--------------------------------------------+-------------------------------
Changes (by mtredinnick):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Nice catch. This patch does need a comment, but the one you've got is
 confusing, since it leaves out the reason for what's going on. A comment
 that just explains why we're doing the truncating is better. It also looks
 very, very fragile: is the way this sequence name is constructed
 documented anywhere? I'd like some confirmation that we aren't going to be
 chasing versions of PostgreSQL forever with changing things here
 (particularly since 8.1 is now a couple of versions behind the latest). It
 might be more robust to also change the SQL creation code to explicitly
 specify the sequence name, as we do with a lot of index names to ensure
 they fit inside the 63 character limit.

 Anyway, we should definitely fix the problem here, including doing so for
 existing setups. Precisely how needs a bit of research to make sure it's
 robust.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8901#comment:1>
Django Code <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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to