[QGIS-trac] [Quantum GIS] #2187: "Could not commit changes to
layer..." and
"duplicate key value violates..." errors when committing changes
in postgis/spatialite
Quantum GIS
qgis at qgis.org
Thu Dec 3 07:34:59 EST 2009
#2187: "Could not commit changes to layer..." and "duplicate key value
violates..." errors when committing changes in postgis/spatialite
---------------------------------------------------------+------------------
Reporter: lutra | Owner: nobody
Type: bug | Status: new
Priority: critical: causes crash or data corruption | Milestone: Version 1.4.0
Component: Data Provider | Version: HEAD
Keywords: | Platform_version:
Platform: All | Must_fix: Yes
Status_info: 0 |
---------------------------------------------------------+------------------
This ticket was open after the observations made here
http://lists.osgeo.org/pipermail/qgis-developer/2009-December/008552.html
To replicate:
use the "regions" layer you can find in the spatialite sample dataset: you
can save it as shapefile and import to postgis. Tested also with other
layers, like the "world borders" vector.
In qgis trunk (but not in 1.3) after merging non adjacent or non
overlapping features (or features with islands) of a postgis layer, after
toggling editing to save changes, the program returns
"ERROR: duplicate key value violates unique constraint "regions_pkey""
and after that
"Could not commit changes to layer regions
Errors: ERROR: 1 feature(s) not added.
SUCCESS: 2 feature(s) deleted."
If the same is done on a spatialite layer only the latter message is shown
(again, only in trunk, not in 1.3).
--
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2187>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list