[postgis-users] Debugging shp2pgsql inserts
Travis Kirstine
traviskirstine at gmail.com
Fri Jul 19 11:19:26 PDT 2013
Using dump format -D instead of inserts seems to work as well (returns line
number)
shp2pgsql -D .....
Thanks for you help!
On 19 July 2013 13:54, andy <andy at squeakycode.net> wrote:
> On 7/19/2013 12:43 PM, Travis Kirstine wrote:
>
>> I've been attempting to import a large shapefile into postgis and I keep
>> running into "ERROR: current transaction is aborted, commands ignored
>> until end of transaction block" when importing the data.
>>
>> Is there a easy method to determine which INSERT causes the
>> transaction to fail? It appears the only why is to catch the stdout as
>> soon as psql errors
>>
>> shp2pgsql -I -W LATIN1 -s 3857 mybigshp.shp mytbl > mysql.sql
>>
>> psql -U user -o log.txt mydb < mysql.sql
>>
>> Thanks
>>
>>
>> ______________________________**_________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-**bin/mailman/listinfo/postgis-**users<http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users>
>>
>>
> In your psql step, use:
>
> psql -v ON_ERROR_STOP=1 -U user -o log.txt mydb < mysql.sql
>
>
> More good options here:
> http://petereisentraut.**blogspot.com/2010/03/running-**
> sql-scripts-with-psql.html<http://petereisentraut.blogspot.com/2010/03/running-sql-scripts-with-psql.html>
>
> -Andy
>
> ______________________________**_________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-**bin/mailman/listinfo/postgis-**users<http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130719/36e0670e/attachment.html>
More information about the postgis-users
mailing list