Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: modelling IPv6 as a number
On Wed, 13 Dec 2006 09:18:31 +1100, Geoff Muldoon
<geoff.muldoon_at_trap.gmail.com> wrote:
>maxwell.dana_at_gmail.com says...
>
>> If I'm not mistaken, IPv6 requires 39 significant digits to represent
>> each possible IP as an integer. Oracle's maximum is number(38). Has
>> anyone devised a scheme to store the integer value of IPv6 in oracle?
>
>Why ever would you store it as a number? It isn't an attribute to which
>you can naturally apply *numeric* functions, adding two IPv6 addresses
>together doesn't make much sense. Store it as a string.
One situation where the fact that an IPv4 address is a number shows up is in netmasks, for working out subnets and broadcast addresses. Presumably there are some similar operations that still apply to IPv6 addresses?
-- Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis toolReceived on Tue Dec 12 2006 - 17:29:03 CST