AW: [Gdal-dev] ERROR import Shape to PostgreSQL

Frank Warmerdam warmerdam at pobox.com
Mon Jan 19 14:00:54 EST 2004


Düster Horst wrote:
> Frank
> 
> I found out that the -lco OVERWRITE=YES support in the postgis driver don't
> delete an existing record in geometry_columns. 
> 
> The error message:
> ERROR 1: AddGeometryColumn failed for layer kva_av_liegen_tmp, layer
> creation has failed.
> ERROR 1: Terminating translation prematurely after failed
> translation of layer lieg_lieg_geom
> 
> When I delete the record ogr2ogr works fine.

Dr. Düster,

I found that with my current PostgreSQL the DROP TABLE command gets rid of
the sequence (%s_ogc_fid_seq), but that the failure of the DROP SEQUENCE
command following it was triggering a rollback of the DROP TABLE command.
I changed around the DeleteLayer() code a bit, and now things seem to work.

Of course, any layers that were half deleted might need to be cleaned up as
you suggest.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list