Re: [HACKERS] New IP address datatype - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] New IP address datatype
Date
Msg-id 20155.928197276@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] New IP address datatype  ("D'Arcy" "J.M." Cain <darcy@druid.net>)
Responses Re: [HACKERS] New IP address datatype  (The Hermit Hacker <scrappy@hub.org>)
Re: [HACKERS] New IP address datatype  ("D'Arcy" "J.M." Cain <darcy@druid.net>)
List pgsql-hackers
> Thus spake Mark Volpe
>> Hosts are specified as '134.67.131.10' or '134.67.131.10/32' and
>> display 134.67.131.10.

Hmm.  This suggests that the example given in the recent discussion
about primary keys is bogus: 198.68.123.0/24 is never equal to
198.68.123.0/27, because they represent networks of different sizes.
If you were talking about host addresses, then the netmask would be
/32 in both cases, and so the issue doesn't arise.

I'm back to the opinion that netmask does matter in comparisons and in
indexes ... but I'd sure like to hear what Vixie has to say about it.

BTW, if we did want to make INET and CIDR have different behavior in
comparisons and indexes, that would mean having two sets of operators
listed in the system catalogs.  We cannot add that as a post-6.5 patch
because it would require an initdb, which is one of the things we don't
do between major releases.  If it's wrong (I'm not convinced) we must
either fix it this week or live with it till 6.6 ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] which list?
Next
From: Bruce Momjian
Date:
Subject: IRC meeting