#6663: UUID as Primary Key (Re. 4682)
----------------------------------------------+-----------------------------
Reporter:  Jonathan Harker <[EMAIL PROTECTED]>  |       Owner:  nobody          
 
  Status:  new                                |   Component:  Database wrapper 
 Version:  SVN                                |    Keywords:  primary key, uuid
   Stage:  Unreviewed                         |   Has_patch:  0                
----------------------------------------------+-----------------------------
 Re [http://code.djangoproject.com/ticket/4682 Ticket 4682]: The OP didn't
 just want to add a UUID field type, that much should be a reasonably
 straightforward change. The real idea is to be able to '''''use UUIDs as
 the primary key''''', instead of an auto-incrementing integer field. There
 are cases where this is a much better solution (busy write-heavy
 databases, remote sync using disconnected or asynchronous datasets, and so
 on).

 I'm interested how much fiddling under the hood this would require, but I
 imagine a PRIMARY_KEY_TYPE option in settings.py. Since one advantage is
 there is no need to query the database to get the next integer in the PK
 field, one can simply generate a UUID code-side. I haven't looked under
 the hood yet, but presumably somewhere there is code to get the next PK
 integer when creating a new row, which can be so tweaked to generate a
 UUID instead, before the insert (and including the PK field and its value
 in the INSERT statement).

 Sorry to ramble but I'd be interested to help out with such a venture :-)

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