[Gdal-dev] OGR PostGIS driver problems on x86_64

Mateusz Loskot mateusz at loskot.net
Fri Mar 23 05:55:19 EDT 2007

Edzer J. Pebesma wrote:
> I'm running debian testing ("etch") on a x86_64 architecture; when I
> run
> ogr2ogr -overwrite -f "PostgreSQL" "PG:dbname=postgis" meuse.shp
> it gives me a segmentation fault. [...] Is this a known problem? How
> can I (help to) resolve this?


I don't suppose it's a known problem.

Please, could you submit a bug report about this problem:


> A related but less serious issue is that the layer name is ignored:
> on the 32 bits architecture
> ogr2ogr -overwrite -f "PostgreSQL" "PG:dbname=postgis" meuse.shp mmm
> will not add a table; after removing mmm table meuse will be written,
>  after renaming the shapefile into mmm.shp (etc) mmm will be written.
> A layer name different from the shapefile name causes it not to be 
> written; no layer name will result in the shapefile name being
> written. Is this documented behaviour?

Are you trying to overwrite layer name from "meuse" to "mmm"
and you expect to achieve this by specifying layer name after
meuse.shp file ?

If my diagnosis is correct, then you are misusing the ogr2ogr utility.
Please, refer to the manual:


and read about -nln option.

Also, in the PostgreSQL driver manual:


you can find example showing how to import data with custom layer name
specified, still using -nln option.

Mateusz Loskot

More information about the Gdal-dev mailing list