[SQLGRASS] d.what.s.pg
javier garcia - CEBAS
rn001 at cebas.csic.es
Thu, 29 May 2003 12:04:11 +0200
Hello.
d.what.s.pg gives an error, and I woul like to know if it is my fault in some
way.
My Postgres table is:
cod_grass | xutm | yutm | codigo | tipo | red | nombre | status
-----------+--------+---------+--------+------+------+-------------------------------+-----------
1 | 631990 | 4209110 | 01002 | A | CHS | RIO PLIEGO |Operativo
2 | 643680 | 4210660 | 01003 | A | CHS | RIO MULA| Operativo
3 | 652390 | 4206450 | 01004 | A | CHS | RBA. SALADA |Operativo
4 | 661830 | 4201470 | 01005 | A | CHS | EL REGUERON | Operativo
...
And I would like to query all the attributes, by clicking on a grass monitor.
So, I, ve prepared a file called "grass_query.sql":
SELECT * FROM redhidro WHERE point(xutm,yutm);
And, I've used:
GRASS:> d.what.s.pg -s sql=grass_query.sql distance=100
But when I click on the map I obtain:
Buttons:
Left: Select site for DB query.
Right: Finish.
-----------------------
Executing
SELECT * FROM redhidro WHERE point(xutm,yutm);
@ '(661633.204134,4192394.186047,661833.204134,4192594.186047)'::box;
clause @ '( )'::box addded automatically.
Error: Connecting to Postgres:ERROR: parser: parse error at or near "@"
-----------------------------------
Is this my fault or a GRASS error?
Thanks for your answers,
best regards,
Javier