linz / gazetteer

New Zealand Gazetteer of official place names
http://www.linz.govt.nz/regulatory/place-names/find-name/new-zealand-gazetteer-official-geographic-names/new-zealand-gazetteer-search-place-names#zoom=0&lat=-41.14127&lon=172.5&layers=BTTT
Other
2 stars 2 forks source link

Error when saving geom #157

Closed SPlanzer closed 3 years ago

SPlanzer commented 3 years ago

can not save feature geometry

Plugin resonds with

Layer Gazetteer feature line: PostGIS error while adding features: ERROR: cannot perform INSERT RETURNING on relation "feature_line" HINT: You need an unconditional ON INSERT DO INSTEAD rule with a RETURNING clause.

SPlanzer commented 3 years ago

related to - https://lists.osgeo.org/pipermail/qgis-developer/2017-January/046777.html

in summary

this was a deliberate change to allow QGIS to directly use the newly inserted features (e.g. add child records to a newly created feature).

To make the views compatible with this, all you need to do is add a

RETURN NEW;

to the end of the insert function (I think). Have a look at the views which I linked in my response in the other thread.

SPlanzer commented 3 years ago

This has been tentatively solved via the branch: rules_returning

It is to remain open until #158 has been resolved and test cases can be written for this functionality

SPlanzer commented 3 years ago

If this solution passes tests and is adopted this while require a deployment to prd database of updated DB src code