#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       
 Keywords:                         |       Stage:  Unreviewed
Has_patch:  1                      |  
-----------------------------------+----------------------------------------
 The autogenerated sequence name for a primary key in postgresql is
 "tablename_pkname_seq".  last_insert_id() constructs this name from the
 tablename and the pkname, but it doesn't correctly truncate it if it's too
 long.  The sequence name must be <= 63 characters.  If it's too long, then
 the tablename and pkname are truncated to 29 characters each.  It's
 possible for the tablename to be 28 characters and the pkname to be 30
 characters.  30 is greater than 29, but the whole thing is exactly 63
 characters, so no truncation is needed.  I've included a patch against
 Django 1.0.  It's been tested on postgres 8.1 on Windows.  I have not
 tried any other versions.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8901>
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