[postgis-tickets] [PostGIS] #2234: shp2pgsql fails on altering target table (and subsequently)

PostGIS trac at osgeo.org
Fri Mar 15 06:30:18 PDT 2013


#2234: shp2pgsql fails on altering target table (and subsequently)
--------------------------------+-------------------------------------------
 Reporter:  leaffan             |       Owner:  mcayland
     Type:  defect              |      Status:  new     
 Priority:  medium              |   Milestone:          
Component:  loader/dumper       |     Version:  2.0.x   
 Keywords:  shp2pgsql geometry  |  
--------------------------------+-------------------------------------------
 Dear all,
 unfortunately I have a bug to report. For me, shp2pgsql fails on a 64bit
 installation on Windows 7. This also happens on a clean install
 (PostgresSQL 9.2.3 x64 + PostGIS 2.0.3 x64).
 This is a sample output of the failing command:

 {{{
 C:\Program Files\PostgreSQL\9.2\bin>shp2pgsql.exe
 d:\sync\shp\wp4_extent.shp wp4_extent
 Shapefile type: Polygon
 Postgis type: MULTIPOLYGON[2]
 SET CLIENT_ENCODING TO UTF8;
 SET STANDARD_CONFORMING_STRINGS TO ON;
 BEGIN;
 CREATE TABLE "wp4_extent" (gid serial,
 "id" int4);
 'MIdINSERT INTO "wp4_extent" ("id",geom) VALUES ('0','');
 COMMIT;
 }}}


 While this is what happens when I use shp2pgsql from version 2.0.1/2.0.2:

 {{{
 C:\Program Files\PostgreSQL\9.2\bin>shp2pgsql_.exe
 d:\sync\shp\wp4_extent.shp wp4_extent
 Shapefile type: Polygon
 Postgis type: MULTIPOLYGON[2]
 SET CLIENT_ENCODING TO UTF8;
 SET STANDARD_CONFORMING_STRINGS TO ON;
 BEGIN;
 CREATE TABLE "wp4_extent" (gid serial,
 "id" int4);
 ALTER TABLE "wp4_extent" ADD PRIMARY KEY (gid);
 SELECT AddGeometryColumn('','wp4_extent','geom','0','MULTIPOLYGON',2);
 INSERT INTO "wp4_extent" ("id",geom) VALUES
 ('0','0106000000010000000103000000010000000500000000DF107759530441D4EDF205363A5841804B35B314842E41D4EDF205363A5841804B35B314842E41F0D6C771657E534100DF107759530441F0D6C771657E534100DF107759530441D4EDF205363A5841');
 COMMIT;
 }}}

 Maybe someone can confirm - or even better - fix this.
 Thanks in advance.
 Regards,
 Markus

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2234>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list