[GRASS-dev] Vector file naming

Brad Douglas rez at touchofmadness.com
Thu Sep 7 10:46:25 EDT 2006


On Thu, 2006-09-07 at 08:29 -0600, Trevor Wiens wrote:
> On Thu, 07 Sep 2006 12:40:46 +0000
> Brad Douglas wrote:
> 
> > On Thu, 2006-09-07 at 13:35 +0200, Markus Neteler wrote:
> > > On Thu, Sep 07, 2006 at 11:12:18AM +0000, Brad Douglas wrote:
> > > > GRASS 6.3.cvs (hamilton2):/usr/src/grass6 > r.to.vect in=elizabeth.los
> > > > out=elizabeth.los feature=area
> > > > Illegal vector map name <elizabeth.los>. Character <.> not allowed.
> > > > ERROR: Map name is not SQL compliant.
> > > > 
> > > > How do file names conflict with SQL92?  I thought SQL92 only applied to
> > > > file contents.  Is this also being used as a workaround for DBF
> > > > limitations?  What I'm getting at is: Why is '.' not allowed?  Doing a
> > > > quick archive search failed to illuminate any light bulbs in the
> > > > immediate vicinity.
> > > 
> > > Hi Brad,
> > > 
> > > AFAIK '.' is reserved for joins. '_' will work. 
> > > 
> > > See
> > > http://grass.itc.it/grass63/manuals/html63_user/sql.html
> > > -> NOTES
> > > 
> > > It would be nice to have the naiming constraints relaxed but
> > > I am not sure if that's really possible.
> > 
> > '_' is also reserved for matching, so that can't be it.
> > 
> > Maybe a better question is: Why doesn't GRASS distinguish between tables
> > and files (database)?  I would much prefer to have GRASS automatically
> > substitute '_' for '.' in the table name so I can keep consistent naming
> > conventions across rasters and vectors.  It's a usability issue and
> > somewhat annoying. :-)
> 
> Well...  To my knowledge standard SQL requires a letter as the first
> character of a table name, and after that letters, numbers, or
> underscores are permitted without quotation. If you want to break those
> rules double quotes are required. So the error message is correct.
> Using a period in a table name without double quoting is a violation of
> SQL naming rules. Normally a period is used to related columns to
> tables, aliases etc.
> 
> For example
> 
> select a.x, b.y
> from schema_one.table_x a, schema_two.table_y b
> where a.q = b.q
> 
> Thus it is impossible for SQL to know how to parse this without quotes.

Who says the *file name* has to be the same as the table name?  No SQL
spec governs that...it's up to the DBMS.  GRASS just doesn't give me
that option, currently.


-- 
Brad Douglas <rez touchofmadness com>                      KB8UYR
Address: 37.493,-121.924 / WGS84    National Map Corps #TNMC-3785




More information about the grass-dev mailing list