Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#659 closed defect (fixed)

shp2pgsql crashing when trying to load into geography order sensitive

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:

Description

I have this statement

shp2pgsql -G -g geog data/roadtrl020.shp ch01.roads_geog > roads_geog.sql

works fine with the PostGIS 1.5 shp2pgsql but crashes with my current build of PostGIS 2.0 shp2pgsql loader. Loading without the -G switch works fine too in both and shp2pgsql-gui also works fine in both.

Actually loading like this also works:

shp2pgsql -g geog -G data/roadtrl020.shp ch01.roads_geog > roads_geog.sql

So it seems to be sensitive to the order of the arguments My build is (running on windows 7)

RCSID: $Id: shp2pgsql-core.h 6008 2010-09-22 23:45:35Z mleslie $ RELEASE: 2.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
USAGE: shp2pgsql [<options>] <shapefile> [<schema>.]<table>

Change History (2)

comment:1 by jadams, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk revision 6922. The -G was attempting to set a default column name and accidentally freeing the old column name when it shouldn't.

comment:2 by robe, 13 years ago

Was this ever an issue with 1.5 shp2pgsql? People seem to be complaining about it on our book forum.

http://www.manning-sandbox.com/thread.jspa?messageID=116532

Note: See TracTickets for help on using tickets.