pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
index for inet(ip address or ip range)
3+ messages / 2 participants
[nested] [flat]

* index for inet(ip address or ip range)
@ 2009-02-26 10:33  Tony Liao <tonyliao@yuehetone.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tony Liao @ 2009-02-26 10:33 UTC (permalink / raw)
  To: pgsql-admin

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?

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: index for inet(ip address or ip range)
@ 2009-02-26 16:36  Lee Azzarello <lee@dropio.com>
  parent: Tony Liao <tonyliao@yuehetone.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Lee Azzarello @ 2009-02-26 16:36 UTC (permalink / raw)
  To: pgsql-admin

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: index for inet(ip address or ip range)
@ 2009-02-27 02:04  Tony Liao <tonyliao@yuehetone.com>
  parent: Lee Azzarello <lee@dropio.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Tony Liao @ 2009-02-27 02:04 UTC (permalink / raw)
  To: Lee Azzarello <lee@dropio.com>; +Cc: pgsql-admin

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
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2009-02-27 02:04 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-02-26 10:33 index for inet(ip address or ip range) Tony Liao <tonyliao@yuehetone.com>
2009-02-26 16:36 ` Lee Azzarello <lee@dropio.com>
2009-02-27 02:04   ` Tony Liao <tonyliao@yuehetone.com>

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