Opened 8 years ago

Closed 7 years ago

#3662 closed defect (fixed)

shp2pgsql does not work in debug mode

Reported by: komzpa Owned by: pramsey
Priority: blocker Milestone: PostGIS 2.4.0
Component: postgis Version: 2.3.x
Keywords: Cc:

Description

shp2pgsql -s 3857 -d -D -g geom -I data/osm/water_polygons.shp water_polygons | psql -X

Shapefile type: Polygon
Postgis type: MULTIPOLYGON[2]
SET
SET
ERROR:  column not found in geometry_columns table
CONTEXT:  PL/pgSQL function dropgeometrycolumn(character varying,character varying,character varying,character varying) line 34 at RAISE
SQL statement "SELECT DropGeometryColumn('',$1,$2,$3)"
PL/pgSQL function dropgeometrycolumn(character varying,character varying,character varying) line 5 at SQL statement
NOTICE:  table "water_polygons" does not exist, skipping
DROP TABLE
BEGIN
CREATE TABLE
ALTER TABLE
                       addgeometrycolumn                        
----------------------------------------------------------------
 public.water_polygons.geom SRID:3857 TYPE:MULTIPOLYGON DIMS:2 
(1 row)

ERROR:  invalid input syntax for type double precision: "    [shp2pgsql-core.c:FindPolygons:441] FindPolygons[0]: allocated space for 6 rings"
CONTEXT:  COPY water_polygons, line 1, column fid: "    [shp2pgsql-core.c:FindPolygons:441] FindPolygons[0]: allocated space for 6 rings"
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ROLLBACK
ERROR:  relation "water_polygons" does not exist

Change History (8)

comment:1 by strk, 8 years ago

I guess the fix would be making sure all debug prints go to stderr ?

comment:2 by robe, 8 years ago

Milestone: PostGIS 2.3.1PostGIS 2.3.2

comment:3 by robe, 8 years ago

Milestone: PostGIS 2.3.2PostGIS 2.4.0

comment:4 by dbaston, 7 years ago

Priority: mediumblocker

comment:5 by robe, 7 years ago

Milestone: PostGIS 2.4.0PostGIS 2.5.0

comment:6 by komzpa, 7 years ago

If someone needs a workaround:

shp2pgsql ... | grep -v "\[" | grep -v '^\s*$$' |  psql

comment:7 by robe, 7 years ago

Milestone: PostGIS 2.5.0PostGIS 2.4.0

comment:8 by pramsey, 7 years ago

Resolution: fixed
Status: newclosed

All notice/debug messages on stderr at r15652 in trunk

Note: See TracTickets for help on using tickets.