[GRASS-user] db.select and SELECT COUNT query
Vincent Bain
bain at toraval.fr
Wed Feb 11 15:57:44 EST 2009
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 ;-)
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 at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
More information about the grass-user
mailing list