andy_at_andyh.co.uk says...
> <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?
subnet ~ substring
My general rule: if you add two values together and the result is
meaningless, it's not a number, it's a string.
Using that rule I win most arguments about also storing values such as
phone numbers and postal/zip codes as strings instead of numbers.
Geoff M
Received on Tue Dec 12 2006 - 17:51:52 CST