From: Steve Atkins <steve@blighty.com>
To: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: Best way to index IP data?
Date: Fri, 11 Jan 2008 08:11:15 -0800
Message-ID: <0B56B6A9-F22E-4098-914D-596F2F3A1CAF@blighty.com> (raw)
In-Reply-To: <13179.1200064791@sss.pgh.pa.us>
References: <200801101614.54729.kevin@kevinkempterllc.com>
<DA6DE53A-2F69-46F3-8C96-B341ADCDDFAF@blighty.com>
<36e682920801101541o7626bbddj428617144240c554@mail.gmail.com>
<Pine.LNX.4.64.0801111025390.30762@localhost>
<13179.1200064791@sss.pgh.pa.us>
On Jan 11, 2008, at 7:19 AM, Tom Lane wrote:
> Pomarede Nicolas <npomarede@corp.free.fr> writes:
>> As ip4r seems to work very well with postgresql, is there a
>> possibility to
>> see it merged in postgresql, to have a native 4 bytes IPv4 address
>> date
>> type ?
>
> Given that the world is going to IPv6 in a few years whether you
> like it
> or not, that seems pretty darn short-sighted to me.
>
> What would make sense IMHO is to adapt the improved indexing support
> in
> ip4r to work on the native inet/cidr types.
Can't be done. The native types are too limited to be effectively
indexed
in that way - they cannot represent arbitrary ranges. ip4r started
with me
trying to retrofit decent indexing onto the cidr type and failing
miserably.
I'll likely be rolling out ip6r/ipr sometime in 2008, as users are
beginning to
express an interest. But even then I don't expect it to replace the inet
and cidr types in core, because it isn't compatible with them.
I'd actually support removing inet/cidr from core completely in the
longer
run. Postgresql is extensible, so we really don't need types used only
by niche users in core, once we have pgfoundry and something like
mysqludf.org/CPAN. But that's a longer term thought.
Cheers,
Steve
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: steve@blighty.com
Subject: Re: Best way to index IP data?
In-Reply-To: <0B56B6A9-F22E-4098-914D-596F2F3A1CAF@blighty.com>
References: <200801101614.54729.kevin@kevinkempterllc.com> <DA6DE53A-2F69-46F3-8C96-B341ADCDDFAF@blighty.com> <36e682920801101541o7626bbddj428617144240c554@mail.gmail.com> <Pine.LNX.4.64.0801111025390.30762@localhost> <13179.1200064791@sss.pgh.pa.us> <0B56B6A9-F22E-4098-914D-596F2F3A1CAF@blighty.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox