Ticket #110 (closed enhancement: fixed)
shp2pgsql new option to not batch commit
| Reported by: | robe | Owned by: | mcayland |
|---|---|---|---|
| Priority: | low | Milestone: | PostGIS Future |
| Component: | postgis | Version: | trunk |
| Keywords: | Cc: |
Description (last modified by jadams) (diff)
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 2. 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. 3. 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.
