[GRASS-dev] Re: [GRASS GIS] #809: v.db.addtable consistently fails in winGrass

GRASS GIS trac at osgeo.org
Fri Jan 8 13:11:11 EST 2010


#809: v.db.addtable consistently fails in winGrass
------------------------------+---------------------------------------------
  Reporter:  JonBall          |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect           |      Status:  new                      
  Priority:  critical         |   Milestone:  6.4.0                    
 Component:  Vector           |     Version:  svn-releasebranch64      
Resolution:                   |    Keywords:  v.db.addtable, wingrass  
  Platform:  MSWindows Vista  |         Cpu:  x86-64                   
------------------------------+---------------------------------------------
Comment (by mmetz):

 Replying to [comment:16 hamish]:
 > I've just attached to this ticket a patch against 6.5 which allows
 spaces in pathnames for hardcoded database paths using G_tokenize().
 >
 > please review.

 Tested, works fine. One minor bug though: in the new v.db.addtable line
 129
 {{{
 eval `g.findfile elem="vector/$GIS_OPT_MAP" file=dbln`
 }}}
 does not work with a fully qualified name, the default settings in
 $MAPSET/VAR are used. Maybe something like
 {{{
 eval `g.findfile elem=vector file=$GIS_OPT_MAP`
 eval `g.findfile elem=vector/$name file=dbln mapset=$mapset`
 }}}
 ?
 >
 > previously there was behavior in Vect_read_dblinks() which allowed the
 dbln file to only contain the layer number and table name if you'd already
 defined the others in previous layer links.
 >
 > I've tried to preserve that, but if the path has spaces I don't think it
 is possible to distinguish between if the last entry is supposed to be the
 driver or the end of the path name. Therefore we lose a tiny bit of
 functionality here, but I don't think anyone knew about or was using that
 trick anyway.

 In grass64+, Vect_write_dblinks() always writes the full connection
 definition, so I would not worry too much. I have not looked at previous
 versions though to see if for layers > 1, only layer number and table name
 were written if the rest was identical to layer 1.

 For grass7, I would suggest to use fs="|" as default (anything but
 whitespace) whenever dblinks are written or printed, e.g.
 Vect_write_dblinks() and v.db.connect -p

 Markus M

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/809#comment:18>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list