[GRASS-dev] [GRASS GIS] #609: d.vect generates bogus SQL when 'attrcol' option is given more than once

GRASS GIS trac at osgeo.org
Tue May 19 14:52:08 EDT 2009


#609: d.vect generates bogus SQL when 'attrcol' option is given more than once
------------------------+---------------------------------------------------
 Reporter:  dylan       |       Owner:  grass-dev at lists.osgeo.org
     Type:  defect      |      Status:  new                      
 Priority:  normal      |   Milestone:  6.5.0                    
Component:  Display     |     Version:  svn-develbranch6         
 Keywords:  d.vect SQL  |    Platform:  Linux                    
      Cpu:  x86-32      |  
------------------------+---------------------------------------------------
 Example based on today's 6.5-SVN:

 {{{
 d.mon x0
 d.vect archsites disp=shape,attr attrcol=str1 attrcol=
 }}}

 Although the user should never construct a command-line such as this, I
 think that some kind of error checking should be involved. The following
 SQL is generated:

 {{{
 select str1, from archsites where cat = 1
 }}}

 I see this note in d.vect/main.c:
 {{{
 attrcol_opt = G_define_standard_option(G_OPT_COLUMN);
 attrcol_opt->key = "attrcol";
 attrcol_opt->multiple = NO;     /* or fix attr.c, around line 102 */
 attrcol_opt->guisection = _("Labels");
 attrcol_opt->description = _("Name of column to be displayed");
 }}}

 It looks like something is trying to use multiple invocations of the
 'attrcol' option to generate a list of columns to be sent to the DB
 driver.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/609>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list