[GRASSLIST:660] Re: Postgresql query

JDougherty jwd at softcom.net
Wed Jul 9 01:09:57 EDT 2003


On Tuesday 08 July 2003 07:52, Glynn Clements wrote:
> JDougherty wrote:
> > I want to run a d.site.pg query that involes an 'OR' in the
> > 'where' field.  Ideally it should be something like:
> >
> > 	select * from <table_name> where atr='A' or atr='B';
> >
> > The above works from within PostgreSQL.  d.site.pg however
> > reports that 'OR' is not a valid option and that atr is not a
> > valid parameter.  I am running GRASS 5.0.3 CVS and PostgreSQL
> > 7.3.2.
>
> If an option value contains spaces, you need to use quotes,
> e.g.
>
> 	d.site.pg ... where="atr='A' or atr='B'"

Glynn,

Thanks.  It appears that the command line works.  I neglected to 
mention earlier that I was trying to use the GUI tcltkgrass 
interface to d.sites.pg.  It does not seem to like more 
complicated "where" clauses.

John





More information about the grass-user mailing list