Thus spake Peter Eisentraut
> network and a host are not the same thing. To construct a cidr value from
> an inet value, you'd have to use some sort of (to be created) network()
> function, e.g., network('127.0.0.5/16') => '127.0/16'. IMO, there is no
Oh, I forgot to mention:
darcy=> select network('127.1.2.3/24'::inet);
network
----------
127.1.2/24
(1 row)
There is also a host and netmask function and note:
darcy=> select host('127.1.2.3/24'::cidr);
ERROR: CIDR type has no host part
But I still see no reason why that can't be implicit if we assign the
"'127.1.2.3/24'::inet" value to a cidr. In other words let "select
('127.1.2.3/24'::inet)::cidr" give the same output.
--
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.