Yes, but in vector maps starting with a number or having a "." in the name is not allowed. Also SQL keywords are excluded... See: https://grass.osgeo.org/programming7/legal__vname_8c_source.html
So, the same logic may be used to check column names (I guess that is what Markus intended). However, it seems that for raster maps more special characters are legal and also v.in.ogr uses layer names from the original data source which can cause conflicts in SQL DB backends... Maybe legal file names, column and table handling is something to re-consider for GRASS 8? Cheers Stefan -----Original Message----- From: grass-dev [mailto:[email protected]] On Behalf Of Moritz Lennert Sent: 21. oktober 2016 09:34 To: Markus Neteler <[email protected]>; GRASS developers list <[email protected]> Subject: Re: [GRASS-dev] [GRASS-user] v.rast.stats ERROR On 20/10/16 22:11, Markus Neteler wrote: > (moved to GRASS-dev) > > Topic: v.rast.stats error message > > On Fri, Oct 14, 2016 at 8:35 PM, Helmut Kudrnovsky <[email protected]> wrote: >>> ERROR: Unable to add column <1_average DOUBLE PRECISION>. >>> ERROR: Adding columns failed. Exiting. >> >> AFAIR in SQL column names starting with a number isn't allowed. > > Is there any Python wrapper around Vect_legal_filename() which could > be used here to generate a better error message? Even though a Python wrapper for Vect_legal_filename would be useful, it wouldn't help here as the problem is the attribute column name, not the filename. Moritz _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
