RE: INET/CIDR types - Mailing list pgsql-hackers

From Larry Rosenman
Subject RE: INET/CIDR types
Date
Msg-id NCBBKBDOOHHEJCJHLLPAAELHHIAA.ler@lerctr.org
Whole thread Raw
In response to Re: INET/CIDR types  (darcy@druid.net (D'Arcy J.M. Cain))
Responses Re: INET/CIDR types  (darcy@druid.net (D'Arcy J.M. Cain))
List pgsql-hackers
What RFC says you can't print all 4 octets of a CIDR Netnumber?

Why does network(cidr) return the whole cidr output just like
select cidr?

I'm just trying to figure out the logic here.

Here is what my Cisco Router that speaks BGP says:
big-bro#term ip netmask-format bit-count
big-bro#sh ip bg 206.66.0.0/20
BGP routing table entry for 206.66.0.0/20, version 150832
Paths: (5 available, best #4) Advertised to non peer-group peers:   157.130.140.109 166.63.135.33 206.66.12.3
206.66.12.4206.66.12.7
 
206.66.12.
8 Local, (aggregated by 4278 206.66.12.3), (received & used)   206.66.12.3 from 206.66.12.3 (206.66.12.3)     Origin
IGP,localpref 0, valid, internal, atomic-aggregate Local, (aggregated by 4278 206.66.12.7), (received & used)
206.66.12.7from 206.66.12.7 (206.66.12.7)     Origin IGP, localpref 0, valid, internal, atomic-aggregate Local,
(aggregatedby 4278 206.66.12.8), (received & used)   206.66.12.8 from 206.66.12.8 (206.66.12.8)     Origin IGP,
localpref0, valid, internal, atomic-aggregate Local, (aggregated by 4278 206.66.12.1)   0.0.0.0 from 0.0.0.0
(206.66.12.1)    Origin IGP, localpref 100, weight 32768, valid, aggregated, local,
 
atomic-
aggregate, best Local, (received & used)   206.66.12.4 from 206.66.12.4 (206.66.12.4)     Origin IGP, metric 0,
localpref100, valid, internal
 
big-bro#

I am just asking for the same type output.

Why is this so hard?

The info is in the type, and the print routine wouldn't be so hard.

I can probably write the function in less than 1 hour, but getting it
integrated is
my stumbling block.



-----Original Message-----
From: D'Arcy J.M. Cain [mailto:darcy@druid.net]
Sent: Monday, July 24, 2000 3:18 PM
To: Larry Rosenman
Cc: Don Baccus; pgsql-hackers@hub.org
Subject: Re: [HACKERS] INET/CIDR types


Thus spake Larry Rosenman
> I was hoping to have some niceties out of the SQL retrieve to print
directly
> in PHP, and not have to massage it.
>
> Why is there such animosity to printing out all 4 octets in some function
> somewhere for a CIDR block?

You keep saying "hostility" as if we are ganging up against you.  Believe
me, I have no animosity towards you and I am sure no one else has either.
We are resisting the change you want simply because it would violate the
RFC which we agreed to follow when we created the types.

If you think this is hostile, you will probably think that the original
discussions in the archives are nuclear war :-).  If you would like to
look it over make sure to set aside a lot of time.  We spent a long time
hashing this out.

--
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 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



pgsql-hackers by date:

Previous
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: Re: INET/CIDR types
Next
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: Re: INET/CIDR types