[GRASS-dev] [grass-code I][520] v.overlay: "SQL parser error" if output name is "and", "or" or "not"

Glynn Clements glynn at gclements.plus.com
Tue Oct 23 14:32:41 EDT 2007


grass-dev at grass.itc.it wrote:

> code I item #520, was opened at 2007-10-23 19:33
> Status: Open
> Priority: 3
> Submitted By: Maciej Sieczka (msieczka)
> Assigned to: Nobody (None)
> Summary: v.overlay: "SQL parser error" if output name is "and", "or" or "not" 
> Issue type: module bug
> Issue status: None
> GRASS version: CVS HEAD
> GRASS component: vector
> Operating system: all
> Operating system version: 
> GRASS CVS checkout date, if applies (YYMMDD): 071023
> 
> 
> Initial Comment:
> I don't think vector names same as logical operators are not allowed. But they make v.overlay fail:
> 
> $ v.overlay ainput=small_box atype=area binput=big_box btype=area output=not operator=and
> 
> Copying vector objects from vector map <small_box>...
>  100%
> Collecting input attributes...
> WARNING: Database connection not defined for layer 1
> Copying vector objects from vector map <big_box>...
>  100%
> Collecting input attributes...
> WARNING: Database connection not defined for layer 1
> DBMI-DBF driver error:
> SQL parser error:
> in statement:
> create table not (cat integer , a_cat integer, b_cat integer )
> Error in db_execute_immediate()
> 
> ERROR: Unable to create table: 'create table not (cat integer , a_cat
>        integer, b_cat integer )'
> 
> 
> 
> Same v.overaly command line, but with output other than "and", "or", "not", works OK.

Vector attributes are stored in a table whose name is exactly the same
as the vector map, so a GRASS vector name must be valid as an SQL
table name.

This isn't something which can easily be fixed without breaking
existing setups. I'm not even sure that it's possible to detect in
advance whether a given name is valid.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list