I can't type today....
----- Forwarded message from Larry Rosenman <ler@lerctr.org> -----

From: Larry Rosenman <ler@lerctr.org>
Subject: Re: [HACKERS] Summary: what to do about INET/CIDR
Date: Fri, 27 Oct 2000 15:09:36 -0500
Message-ID: <20001027150936.A16595@lerami.lerctr.org>
User-Agent: Mutt/1.3.10i
X-Mailer: Mutt http://www.mutt.org/
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@posgresql.org

* Tom Lane <tgl@sss.pgh.pa.us> [001027 15:07]:
> Larry Rosenman <ler@lerctr.org> writes:
> > OK, what I really meant was a way to coerce a CIDR entity to INET so 
> > that host() can work with a CIDR type to print all 4 octets. 
> 
> Hm.  I don't see any really good reason why host() rejects CIDR input
> in the first place.  What's wrong with producing the host address
> that corresponds to extending the CIDR network address with zeroes?
Agreed.  If we could do that, I'd be satisfied. 

This is what started my tirade in the summer (trying to do an IP
Allocation system). 


> 
> > Currently you can't coerce a CIDR type to INET. 
> 
> Well you can, but it doesn't *do* anything.  One of the peculiarities
> of these two types is that the cidr-vs-inet flag is actually stored
> in the data value.  The type-system differentiation between CIDR and
> INET is a complete no-op for everything except initial entry of a value
> (ie, conversion of a text string to CIDR or INET); all the operators
> that care (which is darn few ... in fact it looks like host() is the
> only one!) look right at the value to see which type they've been given.
> So applying a type coercion may make the type system happy, but it
> doesn't do a darn thing to the bits, and thus not to the behavior of
> subsequent operators either.  I have not yet figured out if that's a
> good thing or a bad thing ...
OIC.  Hadn't looked that closely.  What I want is a way to print all 4
octets of a CIDR/INET entry at ALL times. 

LER
> 
> 			regards, tom lane
-- 
Larry Rosenman                      http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

----- End forwarded message -----

-- 
Larry Rosenman                      http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Fri, 27 Oct 2000 15:11:09 -0500
Larry Rosenman <ler@lerctr.org>
(forw) Re: Summary: what to do about INET/CIDR