[GRASS-user] db.select and SELECT COUNT query

Vincent Bain bain at toraval.fr
Wed Feb 11 15:36:58 EST 2009


Hi,
has anybody ever had this kind of message ?

Working on grass6.4.0svn, considering a database connection through the
pg driver ; in order to count records matching an attribute (attr) value
I execute this command on a table (table1) linked to a vector map :
        
         echo "select count(*) from table1 where attr=201" | db.select
        
The result should be 3. And db.select returns :

        ATTENTION : column 'count' : type int8 (bigint) is stored as
        integer (4
                    bytes) some data may be damaged
        count
        3

In the end, it returns the result, but what does this message mean ?
(Of course the same instruction given at the psql prompt raises no
special warning).

Any idea ?

Thank you in advance,
Vincent.



More information about the grass-user mailing list