Matteo,
When overwriting, a fresh new file/table is creating, without keeping
anything from the existing version.
You could probably just blank your target with
ogrinfo target.shp -sql "DELETE FROM target" -dialect SQLITE
and then ogr2ogr -append target.shp PG:.... -nln target
Even
Le 06/10/2021 à 17:37, matteo a écrit :
Hi list,
I've a script that uses ogr2ogr to copy, actually overwrite, tables
from PG to shapfiles.
The PG fields are all text (without a specified length) and the target
shapefile that will be overwritten have all text field length equals
to 254.
When overwriting the length is changes to 80. Is there any specific
option to keep the original field length?
Cheers and thanks
Matteo
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev