[GRASS5] 5.1: map/table name restrictions due to SQL
John A. Preston
jpreston at uwimona.edu.jm
Mon Feb 17 17:25:49 EST 2003
> Markus Neteler wrote:
>
> > 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
>
> > Question is if we want to restrict the map names completely for
> > GRASS to the SQL rules or find a better workaround...
I have gotton around this problem in programming URL's by
translating the forbidden characters to a sequence of
allowed characters, and translating the sequence back where necessary.
Thus the user would be allowed to user wdbtemp4.area but if that had to
be used as a table name it might be wdbtemp4#-#areas.
What would be necessary is a pair of routines that encode/decode
the table names taking care of any forbidden characters.
--
John Preston <jpreston at uwimona.edu.jm>
More information about the grass-dev
mailing list