Thread: RE: RE: even more CIDR weirdness (was equality operator on CIDR colum n as primary key)
RE: RE: even more CIDR weirdness (was equality operator on CIDR colum n as primary key)
From
"Mayers, Philip J"
Date:
Hmm. Hopefully that will sort the problem out. I am fairly sure it's index-related - if a CIDR-type column is either a PRIMARY KEY or explicitly set to UNIQUE, i.e. any indices on the column, the equality operator fails. No index = works fine. Does that tally with the problem you mentioned? Regards, Phil +----------------------------------+ | Phil Mayers, Network Support | | Centre for Computing Services | | Imperial College | +----------------------------------+ -----Original Message----- From: Stephan Szabo [mailto:sszabo@megazone23.bigpanda.com] Sent: 30 August 2000 15:37 To: Mayers, Philip J Cc: 'pgsql-general@postgresql.org' Subject: Re: [GENERAL] RE: even more CIDR weirdness (was equality operator on CIDR colum n as primary key) IIRC, there were some problems with CIDR where it was considering the low bits significant even though they might not have been set (in the case of 192.169/16 for example) which was causing fairly odd behavior. I believe they've routed out these problems in current sources so it should be fixed for 7.1. Stephan Szabo sszabo@bigpanda.com On Wed, 30 Aug 2000, Mayers, Philip J wrote: > > Ok, now I'm getting truly confused. It works with some networks, but not > with others: > > > test=> select * from test; > network | netcol > ----------------+-------- > 192.168/16 | 192/8 > 192/8 | 192/4 > 155.198/16 | > 155.198.1/24 | > 156.198/16 | > 156.198.1/24 | > 193.63.75.0/27 | > (7 rows) > > test=> select * from test where network = '192.168/16'; > network | netcol > ---------+-------- > (0 rows) > > test=> select * from test where network = '193.63.75.8/27'; > network | netcol > ----------------+-------- > 193.63.75.0/27 | > (1 row) > > test=> select * from test where network = '193.63.75.8/27'; > network | netcol > ----------------+-------- > 193.63.75.0/27 | > (1 row) > > test=> select * from test where network = '155.198/16'; > network | netcol > ---------+-------- > (0 rows)