Re: [HACKERS] inet/cidr type comparisons

2001-06-11 Thread Tom Lane
Alex Pilosov <[EMAIL PROTECTED]> writes: > On Mon, 11 Jun 2001, Tom Lane wrote: >> While there may not be a user-visible function for next-network-part, >> that hardly matters since the special-indexqual stuff isn't user-visible >> either. > Well, since I'm making an indexqual clause, I do need a

Re: [HACKERS] inet/cidr type comparisons

2001-06-11 Thread Tom Lane
Jim Mercer <[EMAIL PROTECTED]> writes: > while you are in there, can you cahnge the print functions so that they > are consistent? I believe they are consistent in 7.1; leastwise, you will have to make a pretty good argument why we should change them again. We had a very long discussion that led

Re: [HACKERS] inet/cidr type comparisons

2001-06-11 Thread Tom Lane
Alex Pilosov <[EMAIL PROTECTED]> writes: > What I have right now is rewriting a <<= b to use index plan : > (a >= network(b)) && ( a <= broadcast(b) ) > However, that breaks down, since (for example) > if a=10.1.2.3/32 and b = 10.1.2.0/24, broadcast(b) will be 10.1.2.255/24, > but 10.1.2.255/24 i

Re: [HACKERS] inet/cidr type comparisons

2001-06-11 Thread Tom Lane
Alex Pilosov <[EMAIL PROTECTED]> writes: > I noticed current wierd behaviour of a less/greater than comparisons of > things involving inet/cidr: > 10.1.2.3/8 is considered to be less than 10.0.0.0/32 And what's wrong with that? Essentially this comes from the conclusion that 10/8 is less than 1