[postgis-users] Using shp2pgsql

Paul Maddock Paul.Maddock at ijus.net
Wed Apr 25 08:02:18 PDT 2012


Nothing, the sql file looks beautiful.  No errors.  The interesting thing to me is that it repeats the error when I pipe it and the error repeats for as many time as there are rows of data.

What could this mean?  Might there be something wrong with my schema?


Shp2psql is supposed to create the table which it does:
SET CLIENT_ENCODING TO UTF8;
SET STANDARD_CONFORMING_STRINGS TO ON;
BEGIN;
CREATE TABLE "columbus"."pole_region" (gid serial PRIMARY KEY,
"location_n" varchar(15),
"height" float8,
"class" varchar(11),
"ownership" varchar(7),
"owner" varchar(80),
"plant_acct" varchar(31),
"vintage_ye" float8,
"inservice_" varchar(12),
"pole_kind" varchar(31),
"pole_type" varchar(24),
"original_t" varchar(25),
"design_sta" varchar(18),
"facility_s" varchar(10),
"ciac_statu" varchar(8),
"ciac_date" varchar(12),
"west_pole_" varchar(6));
SELECT AddGeometryColumn('columbus','pole_region','geom_3754','3754','MULTIPOLYGON',4);

From: Denis Rouzaud [mailto:denis.rouzaud at gmail.com]
Sent: Wednesday, April 25, 2012 10:52 AM
To: PostGIS Users Discussion
Cc: Paul Maddock
Subject: Re: [postgis-users] Using shp2pgsql

You could output shp2pgsql to a SQL file, then use it in psql to see at which line the error occurs.



On 04/25/2012 04:46 PM, Paul Maddock wrote:
Dear all,

I'm using the following code to transform a shapefile I have into a table and import it into my database:
shp2pgsql -s 3754 ~/JOE/columbus/pole_region.shp columbus.pole_region | psql -h localhost -U postgres -p 5432 -d paul

When it runs I have to put my password in for postgres (expected), and I get the following output:

ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block

The database paul is created and the schema columbus is created and is owned by postgres.

What am I doing wrong?  Do I have to set datatypes?

Thanks for the help,
Paul


Paul A. Maddock
Mapping Technician
IJUS LLC
560 Officenter Place
Gahanna, OH 43230
Cell: (513) 404-6476
[cid:image001.gif at 01CD22D2.3CCDA8C0]<http://www.ijus.net/index.html>





_______________________________________________

postgis-users mailing list

postgis-users at postgis.refractions.net<mailto:postgis-users at postgis.refractions.net>

http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120425/9cf19533/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 3201 bytes
Desc: image001.gif
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120425/9cf19533/attachment.gif>


More information about the postgis-users mailing list