[postgis-users] error loading data using shp2pgsql

David Garnier david.garnier at etudier-online.com
Sat Aug 24 00:54:36 PDT 2002


Hello,
Look at my post here :
http://postgis.refractions.net/pipermail/postgis-users/2002-May/001064.html

To put it simply, some records are bogus and shp2pgsql can't handle
them. The problem is that when it encounter one bogus record, it will
throw away the whole transaction block (250 records). There are two
solutions:
* fix the bogus records,
* modify the shp2pgsql source to remove the transaction support.

Best Regards,
David Garnier

le sam 24-08-2002 à 03:19, Dylan Keon a écrit :
> Hi, I'm just getting started with PostGIS.  I tried loading two 
> shapefiles for practice...cities (point) and rivers (line).  The first 
> went just fine, the second is giving me errors.
> 
> I suspect this is a simple problem, but couldn't find anything similar 
> in the archives.
> 
> SuSE 7.3
> PostgreSQL 7.2.2
> PostGIS 0.7.1
> 
> Thanks,
> --Dylan
> 
> ============================== error text ============================
> # shp2pgsql rivers rivers1 mapserv > rivers.sql
> # psql -d mapserv -f rivers.sql
> CREATE
> psql:/tmp/rivers.sql:2: NOTICE:  Error occurred while executing PL/pgSQL 
> function addgeometrycolumn
> psql:/tmp/rivers.sql:2: NOTICE:  line 39 at execute statement
> psql:/tmp/rivers.sql:2: ERROR:  Cannot insert a duplicate key into 
> unique index gc_pk
> BEGIN
> psql:/tmp/rivers.sql:4: ERROR:  pg_atoi: error in "*": can't parse "*"
> psql:/tmp/rivers.sql:5: NOTICE:  current transaction is aborted, queries 
> ignored until end of transaction block
> *ABORT STATE*
> psql:/tmp/rivers.sql:6: NOTICE:  current transaction is aborted, queries 
> ignored until end of transaction block
> *ABORT STATE*
> .
> .
> .
> *ABORT STATE*
> #
> ======================================================================
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
-- 
Website: http://dgarnier.etudier-online.com
PGP key: http://www.davidgarnier.com/public_gpg_key.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 241 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20020824/cd704645/attachment.pgp>


More information about the postgis-users mailing list