[Qgis-developer] problem with ON INSERT TO ... DO INSTEAD postgres rules

Luca Lanteri lklanteri at gmail.com
Mon Jan 23 07:19:48 PST 2017


Hi to all,

after a short disscussion in qgis user list I've opened this ticket [0],
because starting from QGIS 2.16 I can't insert new feature in postgres
views using rules. When I try to insert a new feature I have this error
[1]. All works fine with QGIS 2.14. The problem happens only with INSERT
rules. UPDATE and DELETE are ok.

I saw that for simple rules I can add a RETURNING * clause and all works
fine, but I have a lot of complex view that use many tables, so RETURNING *
clause doesn't work and compose the clause it's really hard.

Then I have some question:
1) Is it really an issue or the problem is due to a new functionality of
QGIS ?
2) In the first case, it could be considered a regression for it works on
QGIS 2.14 ?
3) Is there a simple way to modify my views by adding a RETURNING clause
without specify all returning field (* doesn't work) ?

I love to know if it's a deliberate change or it's just a bug,so I can
choose if I have to modify all my views, in order to allow me to migrate to
QGIS 2.18.

Many thanks in advance
Regards
Luca


[0] https://hub.qgis.org/issues/16083

[1] Impossibile applicare le modifiche al vettore v_frane_pol_full

Errori: ERRORE: 1 geometria non aggiunta.
Errori della sorgente dati:
Errore PostGIS nell'aggiunta delle geometrie: ERROR: cannot perform INSERT
RETURNING on relation "v_frane_pol_full"
HINT: You need an unconditional ON INSERT DO INSTEAD rule with a RETURNING
clause.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170123/aa0cf5ed/attachment.html>


More information about the Qgis-developer mailing list