pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tony Liao <tonyliao@yuehetone.com>
To: Lee Azzarello <lee@dropio.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: index for inet(ip address or ip range)
Date: Fri, 27 Feb 2009 10:04:14 +0800
Message-ID: <8f750b7c0902261804g20c5f90ax33e95a748ec18835@mail.gmail.com> (raw)
In-Reply-To: <16b031c0902260836p5577e667jdbf120eb07998ef7@mail.gmail.com>
References: <8f750b7c0902260233q639be440qafce23613d9d77db@mail.gmail.com>
	<16b031c0902260836p5577e667jdbf120eb07998ef7@mail.gmail.com>

hi,lee
        CIDR is only accept ipv4 but not ip range such as 192.168.1.0/24.
        INET type is what I need,but I don't know how to create index.
        does anyone have ideas?

2009/2/27 Lee Azzarello <lee@dropio.com>

> On Thu, Feb 26, 2009 at 5:33 AM, Tony Liao <tonyliao@yuehetone.com> wrote:
> > hello,everybody
> >           I want to create index for column ip1 and ip2.I know there is a
> > contrib name ip4r.but the column ip1(ip2) would be a ip address or ip
> range.
> >           The query would do select ....... where ip1>>='96.168.65.84' or
> > ip2>>='96.168.65.84'.
> >           does anyone have ideas?
>
> The ipv4 type can accept CIDR blocks. Would that work for you?
>
> -lee
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>

view thread (3+ messages)

Message-ID: <8f750b7c0902261804g20c5f90ax33e95a748ec18835@mail.gmail.com>
Permalink:  ../8f750b7c0902261804g20c5f90ax33e95a748ec18835@mail.gmail.com/
Also on:    postgresql.org/message-id/8f750b7c0902261804g20c5f90ax33e95a748ec18835@mail.gmail.com

 · 

reply

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-admin@postgresql.org
  Cc: tonyliao@yuehetone.com, lee@dropio.com
  Subject: Re: index for inet(ip address or ip range)
  In-Reply-To: <8f750b7c0902261804g20c5f90ax33e95a748ec18835@mail.gmail.com>
  References: <8f750b7c0902260233q639be440qafce23613d9d77db@mail.gmail.com> <16b031c0902260836p5577e667jdbf120eb07998ef7@mail.gmail.com> <8f750b7c0902261804g20c5f90ax33e95a748ec18835@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