Re: IP addresses - Mailing list pgsql-general

From Steve Atkins
Subject Re: IP addresses
Date
Msg-id B1E67A53-678D-4817-9C14-F9236E087184@blighty.com
Whole thread Raw
In response to Re: IP addresses  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: IP addresses
List pgsql-general
On Nov 20, 2007, at 3:41 PM, Tom Lane wrote:

> "Sander Steffann" <s.steffann@computel.nl> writes:
>> From: "Harald Fuchs" <hf0217x@protecting.net>
>>> Forget inet.  Check out http://pgfoundry.org/projects/ip4r/ and
>>> be happy.
>
>> I would be happy if it would support IPv6 :-)  Are there plans to
>> make ip6r
>> or something like that?
>
> What's the point?  You might as well use the regular inet type if you
> need to handle ipv6.

ip4r's main advantage over inet is that it allows you to answer
the question "is this IP address in any of these large number of
address ranges" efficiently. It's useful for customer address
allocation, email filtering blacklists, things like that.

A range-indexable ipv6 type would be useful in theory, but I've
not seen a need for it in production yet. When there is, extending
ip4r to become ip6r would be possible.

Cheers,
   Steve


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: IP addresses
Next
From: Ow Mun Heng
Date:
Subject: Re: Calculation for Max_FSM_pages : Any rules of thumb?