Opened 15 years ago

Last modified 7 years ago

#110 closed enhancement (fixed)

shp2pgsql new option to not batch commit — at Initial Version

Reported by: robe Owned by: robe
Priority: low Milestone: PostGIS Fund Me
Component: postgis Version: master
Keywords: Cc:

Description

What steps will reproduce the problem?

  1. If you have some geometries that fail insert such as polygons without

closed rings, it kills the current batch and gives a more or less meaningless message

  1. This has happened to me a lot and a lot of users we train. A lot of the

time the data should just rightfully not be added.

  1. Write now to overcome this I generate a .sql file and use sed to remove

the begin commits which means I can't use the normal | to directly load

I think the simplest option is to allow users with a flag to have the option to not have begin commits so that everything is in its own transaction. That way at least a whole batch of good records aren't lost because of one bad apple.

I know we have talked about other options such as allowing these beasts into the database or nulling the geometry if invalid etc — though those options are trickier to implement and may not handle all cases.

Change History (0)

Note: See TracTickets for help on using tickets.