On Tue, Jul 19, 2011 at 1:02 PM, Daniel Swarbrick <
[email protected]> wrote:

> The snippet seems to have been removed (returns "page not found").<snip>


Wtf? :X

http://djangosnippets.org/snippets/

Looks like they have suffered some sort of data loss.. I'm seeing only
snippets from 2 weeks ago, then 1 from an hour ago lol.

I've reposted:

http://djangosnippets.org/snippets/2493/

And as luck would have it, it's given me the EXACT same ID... wtf? More than
a coincidence? lol.


> I
> was curious to have a look at how you were handling this. For sure,
> Postgres has native support for ipv4 and ipv6 address storage. AFAIK,
> MySQL does not... although could store an ipv4 address in a 32-bit
> unsigned int field. I don't know of any DB engines that support 128
> bit ints however (for ipv6).
>

Yeah, it's storing using an unsigned int, but there's no way the same logic
could be applied to ipv6.

If I was to continue using MySQL for ipv6 storage, I'd probably create a
table with a column for each byte, convert to an int, and apply a unique
index to them all.


>
> Django 1.4 alpha already uses Postgres' 'inet' field type for
> IPAddressField and GenericIPAddressField. Other DB backends use
> varchar(15) and varchar(39) respectively - which probably leads to
> some interest sorting side effects.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" 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-developers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en.

Reply via email to