Tom Lane writes:
[CIDR and INET]
> Alternatively, if no one cares enough about these types to even
> understand what they should do, maybe we should rip 'em out?
Actually, I'm a happy user of these types, so that would certainly make me
unhappy...
CIDR stores network addresses, so '10.8/16' might be some network. INET
stores both host addresses and, optionally, the network it's in, so
'10.8.7.6/16' is the given host in the network '10.8/16'. Alternatively,
INET '10.8.7.6' is just a host with no network. IMO, there is one of two
bugs in the CIDR input routine:
1) '10.8.7.6/16' in not rejected
2) Since it is accepted, at least the hidden fields need to be zeroed.
(But note that this bug is only exposed when you use the type improperly
in the first place.)
Using the same operators for cidr and inet is fine as long as this is
fixed.
--
Peter Eisentraut Sernanders väg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden