[GRASS-dev] [GRASS GIS] #3919: db.dropcolumn and v.db.dropcolumn do not drop columns

GRASS GIS trac at osgeo.org
Sun Oct 13 11:00:58 PDT 2019


#3919: db.dropcolumn and v.db.dropcolumn do not drop columns
-------------------------+--------------------------------------------
  Reporter:  veroandreo  |      Owner:  grass-dev@…
      Type:  defect      |     Status:  new
  Priority:  normal      |  Milestone:  7.8.1
 Component:  Database    |    Version:  git-releasebranch78
Resolution:              |   Keywords:  db.dropcolumn, v.db.dropcolumn
       CPU:  x86-64      |   Platform:  Linux
-------------------------+--------------------------------------------

Comment (by veroandreo):

 So, I added the print line locally... It seems that the SQL statement is
 too long indeed. Here is the output:

 {{{
 v.db.dropcolumn map=segs_stats_map column=dem_5m_cba_min_nbrmean
 DBMI-SQLite driver error:
 Error in sqlite3_prepare():
 incomplete input

 DBMI-SQLite driver error:
 Error in sqlite3_prepare():
 incomplete input

 ERROR: Error while executing: 'CREATE TEMPORARY TABLE
 segs_stats_map_backup
        (cat INTEGER, IGN_Cba_02m_blue_min DOUBLE PRECISION,
        IGN_Cba_02m_blue_max DOUBLE PRECISION, IGN_Cba_02m_blue_range
 DOUBLE
        PRECISION, IGN_Cba_02m_blue_mean DOUBLE PRECISION,
        IGN_Cba_02m_blue_stddev DOUBLE PRECISION, IGN_Cba_02m_blue_median
        DOUBLE PRECISION, IGN_Cba_02m_blue_first_quart DOUBLE PRECISION,
        IGN_Cba_02m_blue_third_quart DOUBLE PRECISION,
        IGN_Cba_02m_blue_perc_90 DOUBLE PRECISION, IGN_Cba_02m_green_min
        DOUBLE PRECISION, IGN_Cba_02m_green_max DOUBLE PRECISION,
        IGN_Cba_02m_green_range DOUBLE PRECISION, IGN_Cba_02m_green_mean
        DOUBLE PRECISION, IGN_Cba_02m_green_stddev DOUBLE PRECISION,
        IGN_Cba_02m_green_median DOUBLE PRECISION,
        IGN_Cba_02m_green_first_quart DOUBLE PRECISION,
        IGN_Cba_02m_green_third_quart DOUBLE PRECISION,
        IGN_Cba_02m_green_perc_90 DOUBLE PRECISION, IGN_Cba_02m_ndvi_min
        DOUBLE PRECISION, IGN_Cba_02m_ndvi_max DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_range DOUBLE PRECISION, IGN_Cba_02m_ndvi_mean
        DOUBLE PRECISION, IGN_Cba_02m_ndvi_stddev DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_median DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_first_quart DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_third_quart DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_perc_90 DOUBLE PRECISION, IGN_Cba_02m_ndwi_min
        DOUBLE PRECISION, IGN_Cba_02m_ndwi_max DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_range DOUBLE PRECISION, IGN_Cba_02m_ndwi_mean
        DOUBLE PRECISION, IGN_Cba_02m_ndwi_stddev DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_median DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_first_quart DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_third_quart DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_perc_90 DOUBLE PRECISION, IGN_Cba_02m_nir_min
        DOUBLE PRECISION, IGN_Cba_02m_nir_max DOUBLE PRECISION,
        IGN_Cba_02m_nir_range DOUBLE PRECISION, IGN_Cba_02m_nir_mean DOUBLE
        PRECISION, IGN_Cba_02m_nir_stddev DOUBLE PRECISION,
        IGN_Cba_02m_nir_median DOUBLE PRECISION,
 IGN_Cba_02m_nir_first_quart
        DOUBLE PRECISION, IGN_Cba_02m_nir_third_quart DOUBLE PRECISION,
        IGN_Cba_02m_nir_perc_90 DOUBLE PRECISION, IGN_Cba_02m_pan_min
 DOUBLE
        PRECISION, IGN_Cba_02m_pan_max DOUBLE PRECISION,
        IGN_Cba_02m_pan_range DOUBLE PRECISION, IGN_Cba_02m_pan_mean DOUBLE
        PRECISION, IGN_Cba_02m_pan_stddev DOUBLE PRECISION,
        IGN_Cba_02m_pan_median DOUBLE PRECISION,
 IGN_Cba_02m_pan_first_quart
        DOUBLE PRECISION, IGN_Cba_02m_pan_third_quart DOUBLE PRECISION,
        IGN_Cba_02m_pan_perc_90 DOUBLE PRECISION,
 IGN_Cba_02m_pan_11_ASM_min
        DOUBLE PRECISION, IGN_Cba_02m_pan_11_ASM_max DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_ASM_range DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_ASM_mean DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_ASM_stddev DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_ASM_median DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_ASM_first_quart DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_ASM_third_quart DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_ASM_perc_90 DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_IDM_min DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_IDM_max DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_IDM_range DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_IDM_mean DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_IDM_stddev DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_IDM_median DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_IDM_first_quart DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_IDM_third_quart DOUBLE PRECISION,
        IGN_Cba_02m_pan_11_IDM_perc_90 DOUBLE PRECISION,
 IGN_Cba_02m_red_min
        DOUBLE PRECISION, IGN_Cba_02m_red_max DOUBLE PRECISION,
        IGN_Cba_02m_red_range DOUBLE PRECISION, IGN_Cba_02m_red_mean DOUBLE
        PRECISION, IGN_Cba_02m_red_stddev DOUBLE PRECISION,
        IGN_Cba_02m_red_median DOUBLE PRECISION,
 IGN_Cba_02m_red_first_quart
        DOUBLE PRECISION, IGN_Cba_02m_red_third_quart DOUBLE PRECISION,
        IGN_Cba_02m_red_perc_90 DOUBLE PRECISION, IGN_Cba_02m_ssi_min
 DOUBLE
        PRECISION, IGN_Cba_02m_ssi_max DOUBLE PRECISION,
        IGN_Cba_02m_ssi_range DOUBLE PRECISION, IGN_Cba_02m_ssi_mean DOUBLE
        PRECISION, IGN_Cba_02m_ssi_stddev DOUBLE PRECISION,
        IGN_Cba_02m_ssi_median DOUBLE PRECISION,
 IGN_Cba_02m_ssi_first_quart
        DOUBLE PRECISION, IGN_Cba_02m_ssi_third_quart DOUBLE PRECISION,
        IGN_Cba_02m_ssi_perc_90 DOUBLE PRECISION, dem_5m_cba_min DOUBLE
        PRECISION, dem_5m_cba_max DOUBLE PRECISION, dem_5m_cba_range DOUBLE
        PRECISION, dem_5m_cba_mean DOUBLE PRECISION, dem_5m_cba_stddev
        DOUBLE PRECISION, dem_5m_cba_median DOUBLE PRECISION,
        dem_5m_cba_first_quart DOUBLE PRECISION, dem_5m_cba_third_quart
        DOUBLE PRECISION, dem_5m_cba_perc_90 DOUBLE PRECISION,
        twi_5m_cba_min DOUBLE PRECISION, twi_5m_cba_max DOUBLE PRECISION,
        twi_5m_cba_range DOUBLE PRECISION, twi_5m_cba_mean DOUBLE
 PRECISION,
        twi_5m_cba_stddev DOUBLE PRECISION, twi_5m_cba_median DOUBLE
        PRECISION, twi_5m_cba_first_quart DOUBLE PRECISION,
        twi_5m_cba_third_quart DOUBLE PRECISION, twi_5m_cba_perc_90 DOUBLE
        PRECISION, neighbors_count DOUBLE PRECISION,
        IGN_Cba_02m_blue_min_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_blue_min_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_blue_max_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_blue_max_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_blue_range_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_blue_range_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_blue_mean_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_blue_mean_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_blue_stddev_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_blue_stddev_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_blue_median_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_blue_median_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_blue_first_quart_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_blue_first_quart_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_blue_third_quart_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_blue_third_quart_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_blue_perc_90_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_blue_perc_90_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_green_min_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_green_min_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_green_max_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_green_max_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_green_range_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_green_range_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_green_mean_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_green_mean_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_green_stddev_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_green_stddev_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_green_median_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_green_median_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_green_first_quart_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_green_first_quart_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_green_third_quart_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_green_third_quart_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_green_perc_90_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_green_perc_90_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_min_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_min_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_max_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_max_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_range_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_range_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_mean_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_mean_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_stddev_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_stddev_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_median_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_median_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_first_quart_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_first_quart_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_third_quart_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_third_quart_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_perc_90_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndvi_perc_90_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_min_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_min_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_max_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_max_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_range_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_range_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_mean_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_mean_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_stddev_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_stddev_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_median_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_median_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_first_quart_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_first_quart_nbrstddev DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_third_quart_nbrmean DOUBLE PRECISION,
        IGN_Cba_02m_ndwi_thi'
 ERROR: Deleting column failed
 }}}

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



More information about the grass-dev mailing list