[Qgis-developer] PostGIS edition and foreign key

Thibaut Gheysen gheysen.t at gmail.com
Tue Mar 3 02:14:26 PST 2015


Hi,

I would like to have your opinion in order to simplify as much as possible
our current workflow.

We have a table parcel and a table operation. The table operation include a
foreign key to the table parcel. We have 2 parcels (A and B) but only
parcel A has operations link on it. I would like to merge the 2 parcels by
keeping the attributes of the parcel A. The merge is doing properly but
impossible to save the edit (Provider errors: PostGIS error while deleting
feature: ERROR: update or delete table "parcel" violates foreign key
constraint"fk_parcel" on table "operation"). I guess this is due to the
fact the Qgis first delete the 2 parcels (A and B) before creating a new
one (merged one).
This behaviour oblige us to export the table parcel into a shapefile and
make the modifications on it. Once done, we import the shapefile into
PostGIS and update the parcel geometry base on it.

Is there any chance to find an easier workflow, without developing a
plug-in ?

Thank for your help.

Best regards,
Thibaut.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150303/3588d65e/attachment.html>


More information about the Qgis-developer mailing list