[GRASS-dev] [GRASS GIS] #2513: v.colors freezes using the pg driver and attr

GRASS GIS trac at osgeo.org
Wed Dec 24 02:24:36 PST 2014


#2513: v.colors freezes using the pg driver and attr
-------------------------------------+--------------------------------------
 Reporter:  jamesp670                |       Owner:  grass-dev@…              
     Type:  defect                   |      Status:  new                      
 Priority:  normal                   |   Milestone:  7.0.0                    
Component:  Database                 |     Version:  svn-trunk                
 Keywords:  freeze in G_fatal_error  |    Platform:  Linux                    
      Cpu:  x86-64                   |  
-------------------------------------+--------------------------------------

Comment(by martinl):

 On the first run `v.colors` creates column with lowercase (`grassrgb`) but
 on the second run the module checks given name (`GRASSRGB`) and tries to
 add column with lowercase again, and it fails. I changed `v.colors` in
 r63700 to be case-sensitive when using PG driver (similarly to SQLite
 driver).

 Anyway I would highly suggest you not to use uppercase names for columns
 when using PG driver. Than you need to escape such columns, eg.

 {{{
 v.db.select soils_general where="\"GRASSRGB\" LIKE '255%'"
 }}}

 Commands like

 {{{
 v.db.select soils_general where="GRASSRGB LIKE '255%'"
 }}}

 will not work because the database driver will check `grassrgb` column
 (lowercase) instead of `GRASSRGB`.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2513#comment:3>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list