On Mon, Jan 12, 2009 at 6:11 PM, Alex Gaynor <alex.gay...@gmail.com> wrote:
>
>
> On Mon, Jan 12, 2009 at 8:09 PM, Ian Kelly <ian.g.ke...@gmail.com> wrote:
>>
>> On Mon, Jan 12, 2009 at 5:32 PM, V.Prudnikov <pru...@gmail.com> wrote:
>> >
>> > Is there any reason why automatic primary key not set to UNSIGNED by
>> > default?
>>
>> Not sure.  Is there any reason why it would be necessary or useful to
>> prevent them from being negative?
>>
>> Ian
>>
>>
>
> My assumption is that like in C if it's unsigned it's maximum value is twice
> as large(because the sign bit isn't necessary).

Oh.  That seems obvious in retrospect.

Probably the reason then is that postgresql (the original backend)
doesn't support unsigned types; it has to be emulated with a check
constraint, so there's nothing to be gained by it in this case.
Oracle does the same as postgresql, and sqlite will happily accept
negative values regardless of whether the column is signed, so mysql
would be the only included backend to benefit.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to