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: 199810090500.BAA28109@candle.pha.pa.us (view raw or flat)
Thread:
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
testing.


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  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

Responses

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-2014 The PostgreSQL Global Development Group