Thread: inet type , select distinct troubles
I've a big database ( 2M rows ) and i use the inet type for ip address .
for example :
test=>create table ip_table (i int4 , addr inet );
CREATE
The i do a lot of inserts in my database , with Perl/DBI . (Note i use AutoCommit=off for performance) :
test=>select count(*) from table_ip ;
500 000 rows //It's normal !
Then i want to select all the ip @ who are different , so
test=>select distinct addr from ip_table ;
192.168.10.10
192.168.10.10
......
10.10.10.10
10.10.10.10
.....
20000 rows //It's not normal !!!!!!
The given address are fictive but the result have some bugs ? Isn't it ?
It seems that the egality test failed ?
Any response or suggestions would be apreciate .
loic@cri74.org