I've also found this very confusing and unexpected. Once I did figure it out it has been very useful. Could
ogrinfo CHEMIN.shp -sql "ALTER TABLE CHEMIN RENAME COLUMN prec_alti TO foo" or similar be added as an example to http://gdal.org/ogrinfo.html and perhaps also as a 'note about ogrinfo with OGR SQL' on http://gdal.org/ogr/ogr_sql.html? Perhaps http://gdal.org/ogr/ogr_sql.html could be updated from: -sql statement: Execute the indicated SQL statement and return the result. to something like: -sql statement: Execute the indicated SQL statement and return the result. In place updates (ALTER TABLE) are also permitted. Eli On Thu, Jun 21, 2012 at 11:03 PM, Hermann Peifer <pei...@gmx.eu> wrote: > On 2012-06-20 19:50, Even Rouault wrote: >> >> >> I know this is going to sound a bit counter-intutive at first... >> >> ogrinfo opens datasources in read/write mode by default... > > > Just out of curiosity: why does an ...info tool use read/write mode by > default? One would expect that it only needs to *read* some info in the data > source? > > Hermann > > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev