[GRASS5] Re: [bug #4056] (grass) db.test fails on sqlite driver

Markus Neteler neteler at itc.it
Sat Feb 18 12:41:40 EST 2006


On Fri, Feb 17, 2006 at 06:11:02PM +0000, Glynn Clements wrote:
> 
> Markus Neteler wrote:
> 
> > > ---
> > > select c1 from grass_test1 where d1 < 500 / 2 and i1 <> 2  and c1 ~ 'bc'
> > > DBMI-SQLite driver error:
> > > Error in sqlite3_prepare():select c1 from grass_test1 where d1 < 500 / 2 and
> > > i1 <> 2  and c1 ~ 'bc'
> > > near "~": syntax error
> > > EXECUTE: ******** ERROR ********
> > > 
> > > '~' is not SQL standard, this is not a bug.
> > > ---
> > > 
> > 
> > I consider it as bug as SQLite supports '~':
> > 
> > http://www.sqlite.org/lang_expr.html
> > 
> > "Supported unary operators are these:
> > 
> >  -    +    !    ~
> 
> Note the use of the word "unary". In the above select statement, the ~
> is being used as a /binary/ operator, which SQLite doesn't support:
> 
>   SQLite understands the following binary operators, in order from
>   highest to lowest precedence:
>   
>       ||
>       *    /    %
>       +    -
>       <<   >>   &    |
>       <    <=   >    >=
>       =    ==   !=   <>   IN
>       AND   
>       OR
> 

Ah, I see - but what does it mean for db.test?
Add a sqlite test to skip it?

Markus




More information about the grass-dev mailing list