[GRASS5] 5.1: map/table name restrictions due to SQL

Markus Neteler neteler at itc.it
Mon Feb 17 10:19:22 EST 2003


Hi,

concerning 5.1 I were glad to receive some recommendations
to following problem. GRASS 5.1 is using SQL internally
which is rather restricted with table names

Supported table name characters are:
[A-Za-z][A-Za-z0-9_]*

means:
 - must start with character
 - dots etc. are forbidden

While the map names due to G_legal_filename() are quite
flexible, the following must fail (note the dot in the out name):

v.extract wdbtemp4 output=wdbtemp4.areas type=area list=1-10000
Copying tables ...
DBMI-DBF driver error: SQL parser error in statement:
create table wdbtemp4.areas ( cat integer, label varchar(40))
Error in db_execute_immediate()
WARNING: Cannot create new table: 'create table wdbtemp4.areas ( cat
         integer, label varchar(40))'
WARNING: Cannot copy table

Question is if we want to restrict the map names completely for
GRASS to the SQL rules or find a better workaround...

If course it is convenient to have geometry and table with the same 
name...

How do other GIS with SQL support manage this problem?
Suggestions are welcome.

 Markus




More information about the grass-dev mailing list