The problem is that IPv4 is only 32-bits and will always only ever be 32-bits. 
So storing something that will only ever be 32-bis into 64-bit space seems a 
bit silly. Perhaps I'm over-optimizing or jumping the gun (say before someone 
somewhere opts to make an IP type :) but seems somewhat severe. I was thinking 
about how to get around it by using a binary column or something like that but 
haven't quite figured that one out yet.



On Mar 25, 2010, at 3:42 PM, Brian Moon wrote:

> What is wrong with BIGINT? Are you looking to have your database do 
> constraint checking on your data?
> 
> Brian.
> --------
> http://brian.moonspot.net/
> 
> On 3/25/10 3:19 PM, Tim Soderstrom wrote:
>> I think this came up a while ago, but the lack of unsigned integers
>> has been bugging me. I know there is or will be a way to do pluggable
>> types in Drizzle but until then, for applications that rely on using
>> unsigned INT for IPs, the only work-around I can think of is to use a
>> BIGINT. Which is too big for an IPv4 but not big enough for IPv6.
>> AAAH! :)
>> 
>> Thoughts on some ways around that? I fear people will do the naughty
>> and start storing IPs as varchars which is quite slow by comparison.
>> 
>> Tim S. _______________________________________________ Mailing list:
>> https://launchpad.net/~drizzle-discuss Post to     :
>> [email protected] Unsubscribe :
>> https://launchpad.net/~drizzle-discuss More help   :
>> https://help.launchpad.net/ListHelp
> 


_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to