Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] CIDR type and functions

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] CIDR type and functions
Date: 1998-10-09 05:00:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> Just curious, what functions did we finally settle on for this type?
> I ask because I just thought of another function that might be useful.
> select block(cidr1, cidr2);
> to return 1 if cidr2 is part of the cidr1 block, -1 if cidr1 is part
> of the cidr2 block and 0 if neither.

Check \df and \fo.  There is a >> and << operators that do subnet

  Bruce Momjian                        |
  maillist(at)candle(dot)pha(dot)pa(dot)us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to


pgsql-hackers by date

Next:From: Tom Ivar HelbekkmoDate: 1998-10-09 08:50:00
Subject: Re: [HACKERS] Open 6.4 items
Previous:From: Thomas G. LockhartDate: 1998-10-09 05:00:32
Subject: Re: [HACKERS] man page installation patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group