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

Re: [HACKERS] CIDR type and functions

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] CIDR type and functions
Date: 1998-10-09 18:16:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Thus spake Bruce Momjian
> Check \df and \fo.  There is a >> and << operators that do subnet
> testing.

[I assume you meant \do]

Cool.  I checked out what other functions as well.  I don't see a couple
that were discussed early on though.  Specifically, how about functions
to extract the  host, the network or the netmask from an address?

Here are the functions I had suggested.

    netmask('') ==
    masklen('') == 24
    host('') ==
    network('') ==

and perhaps;

    class('') == C
    classnet('') == 192.3.4

Can I help code up some of this stuff?

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

In response to


pgsql-hackers by date

Next:From: Peter T MountDate: 1998-10-09 18:48:30
Subject: Re: [HACKERS] dynamic libraries
Previous:From: Bruce MomjianDate: 1998-10-09 17:46:06
Subject: Re: [HACKERS] dynamic libraries

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