Le dimanche 03 août 2014 00:14:30, Martin Landa a écrit : > Hi, > > when exporting features to PostGIS layer (python script) I discovered > that ogc_fid_seq is not updated. > > Eg. > > > select last_value from stavebniobjekty_ogc_fid_seq; > last_value > ------------ > 1 > select max(ogc_fid) from stavebniobjekty; > max > ------ > 2572 > > Any idea what is missing in my script? Thanks, Martin
Does your script explicitely set the FID before calling CreateFeature() ? If so, then the COPY (or INSERT if you use PG_USE_COPY = NO, but both have the same effect) will explicitely affect the ogc_fid column of the features, which has the effect of not incrementing the sequence. You likely need to explicitely call setval() -- Geospatial professional services http://even.rouault.free.fr/services.html _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev