[GRASS-dev] DBMI driver speed test
Glynn Clements
glynn at gclements.plus.com
Mon Jun 16 19:55:11 EDT 2008
Markus Neteler wrote:
> I have made a speed comparison (also to test functionality,
> see below) of the DBMI drivers:
> The mysql driver had some problems
> * http://trac.osgeo.org/grass/ticket/188
> * this one (reserved word as column name?):
>
> elev_lidrural_mrpts:
> Copy vector <elev_lidrural_mrpts at PERMANENT> to current mapset as
> <myelev_lidrural_mrpts>
> WARNING: Vector map <myelev_lidrural_mrpts> already exists and will be
> overwritten
> WARNING: Table <myelev_lidrural_mrpts> linked to vector map
> <myelev_lidrural_mrpts> does not exist
> DBMI-MySQL driver error:
> Cannot create table:
> CREATE TABLE myelev_lidrural_mrpts ( cat INT, Class INT, Layer INT, Return INT )
> You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use
> near 'Return INT )' at line 1
>
> Not sure what's wrong here.
MySQL considers "return" (SQL isn't case sensitive) as a reserved
word:
http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html
so you can't use it as a column name.
According to:
http://www.postgresql.org/docs/8.3/interactive/sql-keywords-appendix.html
it's a reserved word in SQL:2003 and SQL:1999, but not in SQL-92 or
PostgreSQL.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list