There is posibly something wrong with the schema.

 

I have just had the same problem. Removed the schema definition from the
shp2pgsql command and then ran psql again and it loaded fine. However,
it loaded into the public schema.

 

So it must be to do with the schema.

 

From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Paul
Maddock
Sent: 25 April 2012 16:02
To: postgis-users@postgis.refractions.net
Subject: Re: [postgis-users] Using shp2pgsql

 

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','MULTIPOLY
GON',4);

 

From: Denis Rouzaud [mailto:denis.rouz...@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

  <http://www.ijus.net/index.html> 

 





_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Infoterra Ltd. Is part of the Astrium GEO-Information Services Division and a 
wholly owned subsidiary of Astrium, Europe's leading space systems and services 
specialist.

Disclaimer. The information contained in this e-mail and its attachments are 
confidential and intended only for the use of the named addressee(s). If you 
are not the intended addressee, please do not read, copy, use or disclose this 
message or its attachments. If you have received this message in error, please 
notify the sender immediately and delete or destroy all copies of this message 
and attachments in all media. Any views or opinions expressed are solely those 
of the author and do not necessarily represent those of Infoterra Ltd and shall 
not form part of any binding agreement.

Infoterra Limited a company registered in England under number 2359955 and 
having its registered office at Atlas House, 41 Wembley Road, Leicester, LE3 
1UT. VAT number GB 476 0468 27. 

P Before printing, think about the environment 

<<image001.gif>>

_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to