Ed,
> Instead of storing the client_addr as a VARCHAR(255), how about
> storing it instead as a 32bit number in a column of type UNISIGNED
> INT? This'll reduce storage and speed queries.
>
> MySQL can convert back and forth using inet_aton and inet_ntoa.
> Perhaps there's something similar for postgres and others? If not,
> it'd be as simple thing to implement. Using the example in the mysql
> docs, SELECT INET_ATON('209.207.224.40') is 3520061480, which is
> 209*256^3 + 207*256^2 + 224^256 + 40.
It won't work for IPv6 IP addresses anymore.
Storing as a 128-bit integer with IPv4 mapped to IPv6
may be an option, but I don't see much advantage in that.
Mark
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/