From: Jonah H. Harris <jonah.harris@gmail.com>
To: Harald Fuchs <hf0217x@protecting.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: JOINing based on whether an IP address is contained within a CIDR range?
Date: Fri, 26 Oct 2007 08:03:25 -0400
Message-ID: <36e682920710260503w79ebde81la456bdefd304da5a@mail.gmail.com> (raw)
In-Reply-To: <pud4v2xfqp.fsf@srv.protecting.net>
References: <b0a4f3350710251122y10648d4id322f12a81001c07@mail.gmail.com>
<pud4v2xfqp.fsf@srv.protecting.net>
On 10/26/07, Harald Fuchs <hf0217x@protecting.net> wrote:
> There are PostgreSQL builtin functions for that, but I think they are
> unable to use indexes. I use http://pgfoundry.org/projects/ip4r/
> and I think it's the best thing since the invention of sliced bread ;-)
Yes:
ip4r('ip') <<= ip4r(cidr('cidr'))
--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com
Edison, NJ 08837 | http://www.enterprisedb.com/
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jonah.harris@gmail.com, hf0217x@protecting.net
Subject: Re: JOINing based on whether an IP address is contained within a CIDR range?
In-Reply-To: <36e682920710260503w79ebde81la456bdefd304da5a@mail.gmail.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