CIDR type and functions - Mailing list pgsql-hackers

From darcy@druid.net (D'Arcy J.M. Cain)
Subject CIDR type and functions
Date
Msg-id m0zRTxb-0000exC@druid.net
Whole thread Raw
Responses Re: [HACKERS] CIDR type and functions  (Bruce Momjian <maillist@candle.pha.pa.us>)
List 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.

--
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] version functions (was NT port of PGSQL - success)
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] RE: [SQL] random tuple