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

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.

Sorry for this /stupid/ question (might be time to go to sleep !)
I realize it must be related to a truncature operated between pg and
grass or something like it.

As it was annoying in a recursive query script, I turned the command in
this :
        echo "select count(*) from table1 where attr=201"\
        | db.select 2>/dev/null
        
Good evening :wink:
Vincent

Le mercredi 11 février 2009 à 21:36 +0100, Vincent Bain a écrit :

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.

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user