inet type , select distinct troubles - Mailing list pgsql-admin

From Loïc TREGOUËT
Subject inet type , select distinct troubles
Date
Msg-id 39293494.DD7163C1@cri74.org
Whole thread Raw
List pgsql-admin
        Hie all ,
 

    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
 

pgsql-admin by date:

Previous
From: hal Lynch
Date:
Subject: postgres-7.0 dying
Next
From: Hans Poo
Date:
Subject: Installation of postgre DBD is easy without RMP