[GRASS5] Trouble with d.what.v.pg

Chris Heg cheg01 at attbi.com
Mon Mar 10 10:58:31 EST 2003


------ Original Message -----
From: "Moritz Lennert" <mlennert at club.worldonline.be>
To: "Chris Heg" <cheg01 at attbi.com>
Cc: "grass5 developers list" <grass5 at grass.itc.it>
Sent: Monday, March 10, 2003 1:15 AM
Subject: Re: [GRASS5] Trouble with d.what.v.pg


> > I'm trying to run d.what.v.pg in 5.0.2 CVS head in the command line
mode.
> > It fails with an error if I select a text column from the database.
> >
> >
> > Executing
> > SELECT * from POLBNDA_area where nam=8222
> > --------------------
> > Error: select Postgres:ERROR: Unable to identify an operator '=' for
types
> > 'text' and 'integer'
> > You will have to retype this query using an explicit cast
> >
> >
> >
> > If I select a numeric column, I get no error but also get no results: it
> > returns "0 rows selected". It looks like buildPg.c is assigning the
> > category value from dig_cats to the variable that is supposed to hold
the
> > search results. Does anyone know how this is supposed to work?
>
> If nam is text, the condition in the query should be: nam='8222'
>
> Moritz
>

But I don't know apriori what the value of nam is, the SQL querey is
supposer to extract that information from the database. I don't understand
how assigning the cat number to the query field name can work.I don't know
much about SQL, but it seems to me I need "find the value of 'nam' for the
record where 'id=8222'. It would require a mapping between a known column in
the database and the value stored in dig_cats.




More information about the grass-dev mailing list