<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Karl-Magnus,</p>
<p>What datatype is your primary key? I think returning is only
required for 64 bit integer or compound primary keys.</p>
<p>For an example of a complex view with return, have a look here:</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/QGEP/datamodel/blob/master/view/vw_qgep_wastewater_structure.sql">https://github.com/QGEP/datamodel/blob/master/view/vw_qgep_wastewater_structure.sql</a></p>
<p>Best regards</p>
<p>Matthias<br>
</p>
<br>
<div class="moz-cite-prefix">On 18/01/17 09:11, Karl-Magnus Jönsson
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:90287cb22323469480691a5f32bf3374@Epost2.kristianstad.se">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Franklin Gothic Book";
panose-1:2 11 5 3 2 1 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Ballongtext Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.E-postmall18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BallongtextChar
{mso-style-name:"Ballongtext Char";
mso-style-priority:99;
mso-style-link:Ballongtext;
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">Hi again!<br>
I’ve made some more testing. By adding a RETURNING clause to
the rule I succeeded to insert features. But since it
appears that the RETURNING clause has to return all the
attributes in the view and my view is complex and consists
of attributes from several tables I couldn’t just add
RETURNING * (It will just return the attributes from the
table inserted into). I had to list all fields in right
order, make some attributes up and cast them to the right
data type. Like this:<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">CREATE OR REPLACE RULE lekplatsredskap_ins AS<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">
</span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">ON
INSERT TO park.v_lekplatsredskap DO INSTEAD INSERT INTO
park.skotselpunkt (kod, antal, inkopsar, fabrikat, nr,
fritext, utforare, geom)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
VALUES (new.kod, new.antal, new.inkopsar, new.fabrikat,
new.nr, new.fritext, new.utforare, new.geom)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
</span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">RETURNING skotselobj_id,1,kod,
'text'::character varying,1234,4567,'plkod'::text, antal,
inkopsar, fabrikat, nr,
fritext,utforare,'2017-01-18'::date,'b_resultat'::character
varying,'status'::character varying,geom ;<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">Please let me know if you find a way to solve
this better or a way to turn this feature off in QGIS.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Franklin
Gothic Book","sans-serif";color:#1F497D">Karl-Magnus
Jönsson</span></b><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:#1F497D">
<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Från:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
Qgis-user [<a class="moz-txt-link-freetext" href="mailto:qgis-user-bounces@lists.osgeo.org">mailto:qgis-user-bounces@lists.osgeo.org</a>]
<b>För </b>Karl-Magnus Jönsson<br>
<b>Skickat:</b> den 17 januari 2017 17:32<br>
<b>Till:</b> Luca Lanteri<br>
<b>Kopia:</b> qgis-user<br>
<b>Ämne:</b> Re: [Qgis-user] can't editing view using
rules<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Could it be connected with the new
feature to "execute expressions on the server side if
possible"? Then you should get the new primay key from the
database before you save edits so you can use it for
childs in subforms etc.<br>
<br>
/Karl-Magnus<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
17 jan 2017 kl. 11:16 skrev Luca Lanteri <<a
href="mailto:lklanteri@gmail.com" moz-do-not-send="true">lklanteri@gmail.com</a>>:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal">This is the postgres log [0]:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">In fact the 2.18 query add a
RETURNING clause that is non present in QGIS 2.14<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I've just opened this ticket: <a
href="http://hub.qgis.org/issues/16083"
moz-do-not-send="true">
http://hub.qgis.org/issues/16083</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Luca <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">[0]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">With QGIS 2.18<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">2017-01-17 11:09:32 CET [25093]:
[5-1] user=l_lanteri,db=sigeo,app=QGIS STATEMENT:
INSERT INTO
"sicod"."v_dif_spon"("geom","oper_id","padr_id","sigla_rile","cod_opera","prog_opera","localita","sponda","alt_min","alt_max","lung","tipologia","efficienza","stato","mat_massi","mat_c_secc","mat_c_int","mat_a_secc","mat_a_int","mat_gabbio","mat_cls","mat_legna","i_manuten","i_nessuna","i_prolung","i_pulizia","i_ricostru","i_sottomur","i_svuotam","so_dissest","so_interra","so_scalzat","so_sifonat","data_rilev","note","utente_crea","data_crea","utente_mod","data_mod","fonte","desc_fonte","font_elab","font_sopr","font_altro")
VALUES
(st_multi(st_geomfromwkb($1::bytea,32632)),$2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,'0',NULL,'0','0','0',NULL,'0','0','0','0','0','0','0','0','0','0','0','2000-01-01',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)
RETURNING "oper_id"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">With QGIS 2.14<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">2017-01-17 11:12:01 CET
[26026]: [3-1] user=l_lanteri,db=sigeo,app=QGIS
LOG: execute addfeatures: INSERT INTO
"sicod"."v_dif_spon"("geom","oper_id","padr_id","sigla_rile","cod_opera","prog_opera","localita","sponda","alt_min","alt_max","lung","tipologia","efficienza","stato","mat_massi","mat_c_secc","mat_c_int","mat_a_secc","mat_a_int","mat_gabbio","mat_cls","mat_legna","i_manuten","i_nessuna","i_prolung","i_pulizia","i_ricostru","i_sottomur","i_svuotam","so_dissest","so_interra","so_scalzat","so_sifonat","data_rilev","note","utente_crea","data_crea","utente_mod","data_mod","fonte","desc_fonte","font_elab","font_sopr","font_altro")
VALUES
(st_multi(st_geomfromwkb($1::bytea,32632)),$2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,'0',NULL,'0','0','0',NULL,'0','0','0','0','0','0','0','0','0','0','0','2000-01-01',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">2017-01-17 10:41 GMT+01:00
Karl-Magnus Jönsson <<a
href="mailto:Karl-Magnus.Jonsson@kristianstad.se"
target="_blank" moz-do-not-send="true">Karl-Magnus.Jonsson@kristianstad.se</a>>:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">Hi!</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">Ok. When I try another view with
an INSERT rule I have the same problem in
2.18.2. Works in 2.14. UPDATE and DELETE are
ok as well. Can we check the resulting SQL
from QGIS? Must be some difference there. I
don’t know if we can turn on logging on our
database.</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:#1F497D"
lang="EN-US">Karl-Magnus Jönsson</span></b><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:#1F497D"
lang="EN-US">
</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""
lang="EN-US">Från:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""
lang="EN-US">
<a href="mailto:mescal72@gmail.com"
target="_blank" moz-do-not-send="true">mescal72@gmail.com</a>
[mailto:<a href="mailto:mescal72@gmail.com"
target="_blank" moz-do-not-send="true">mescal72@gmail.com</a>]
<b>För </b>Luca Lanteri<br>
</span><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Skickat:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
den 16 januari 2017 14:44<br>
<b>Till:</b> Karl-Magnus Jönsson<br>
<b>Kopia:</b> qgis-user<br>
<b>Ämne:</b> Re: [Qgis-user] can't editing
view using rules</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi
Magnus, thanks for the answer. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I
think my rules are ok also because they
work fine with QGIS 2.14.<o:p></o:p></p>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The
strange things is that the error say
about an "<span style="font-size:9.5pt">INSERT
RETURNING" when I don't need any
RETURING clause.</span><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The
problem happens only with INSERT
rules. UPDATE and DELETE are ok.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">this
is my INSERT rule:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">CREATE
OR REPLACE RULE dif_spon_insert AS<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
ON INSERT TO sicod.v_dif_spon DO
INSTEAD INSERT INTO sicod.dif_spon
(padr_id, sigla_rile, prog_opera,
localita, sponda, alt_min, alt_max,
lung, tipologia, efficienza, stato,
mat_massi, mat_c_secc, mat_c_int,
mat_a_secc, mat_a_int, mat_gabbio,
mat_cls, mat_legna, i_manuten,
i_nessuna, i_prolung, i_pulizia,
i_ricostru, i_sottomur, i_svuotam,
so_dissest, so_interra, so_scalzat,
so_sifonat, note, data_rilev,
desc_fonte, font_elab, font_sopr,
font_altro, geom)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
VALUES (new.padr_id, new.sigla_rile,
new.prog_opera, new.localita,
new.sponda, new.alt_min,
new.alt_max, new.lung,
new.tipologia, new.efficienza,
new.stato, new.mat_massi,
new.mat_c_secc, new.mat_c_int,
new.mat_a_secc, new.mat_a_int,
new.mat_gabbio, new.mat_cls,
new.mat_legna, new.i_manuten,
new.i_nessuna, new.i_prolung,
new.i_pulizia, new.i_ricostru,
new.i_sottomur, new.i_svuotam,
new.so_dissest, new.so_interra,
new.so_scalzat, new.so_sifonat,
new.note, new.data_rilev,
new.desc_fonte, new.font_elab,
new.font_sopr, new.font_altro,
new.geom);<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">2017-01-16
7:56 GMT+01:00 Karl-Magnus Jönsson <<a
href="mailto:Karl-Magnus.Jonsson@kristianstad.se" target="_blank"
moz-do-not-send="true">Karl-Magnus.Jonsson@kristianstad.se</a>>:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi!</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">Are you sure it isn’t
an issue with the view? I have a
view with rules and it work in
2.18. When you have conditions in
the rule you must have another
rule on the same event that is
unconditional. Check the last
paragraph in the description :
<a
href="https://www.postgresql.org/docs/current/static/sql-createrule.html"
target="_blank"
moz-do-not-send="true">
https://www.postgresql.org/docs/current/static/sql-createrule.html</a></span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">In my case I have a
unconditional rule that does
nothing:</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">CREATE OR REPLACE
RULE v_prislistor_upd_ins AS</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> ON UPDATE TO
park.v_prislistor</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> WHERE
<a href="http://old.id"
target="_blank"
moz-do-not-send="true">old.id</a>
IS NULL DO INSTEAD INSERT INTO
park.priser (kod, pris, utforare)</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> VALUES (new.kod,
new.pris, new.utforare);</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">CREATE OR REPLACE
RULE v_prislistor_upd_nothing AS</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> ON UPDATE TO
park.v_prislistor DO INSTEAD
NOTHING;</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">CREATE OR REPLACE
RULE v_prislistor_upd_upd AS</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> ON UPDATE TO
park.v_prislistor</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> WHERE
<a href="http://old.id"
target="_blank"
moz-do-not-send="true">old.id</a>
IS NOT NULL DO INSTEAD UPDATE
park.priser SET pris = new.pris</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> WHERE
<a href="http://priser.id"
target="_blank"
moz-do-not-send="true">priser.id</a>
= <a href="http://old.id"
target="_blank"
moz-do-not-send="true">
old.id</a>;</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:#1F497D"
lang="EN-US">Karl-Magnus Jönsson</span></b><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:#1F497D"
lang="EN-US">
</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Från:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
Qgis-user [mailto:<a
href="mailto:qgis-user-bounces@lists.osgeo.org"
target="_blank"
moz-do-not-send="true">qgis-user-bounces@lists.osgeo.org</a>]
<b>För </b>Luca Lanteri<br>
<b>Skickat:</b> den 13 januari
2017 16:39<br>
<b>Till:</b> qgis-user<br>
<b>Ämne:</b> [Qgis-user] can't
editing view using rules</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi
to all,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">starting
fron QIS 2.16 I can't edit
anymore postgres views
with rules. When I try to
insert a new feature I
have this error [0]. All
works fine with QGIS 2.14 <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Can
anyone confirm the issue ?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Luca<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">[0]<o:p></o:p></p>
</div>
<div>
<p
style="margin:0cm;margin-bottom:.0001pt"><span
style="font-size:9.5pt">Impossibile
applicare le modifiche
al vettore
v_frane_pol_full</span><o:p></o:p></p>
<p
style="margin:0cm;margin-bottom:.0001pt"><span
style="font-size:9.5pt"> </span><o:p></o:p></p>
<p
style="margin:0cm;margin-bottom:.0001pt"><span
style="font-size:9.5pt">Errori:
ERRORE: 1 geometria non
aggiunta.</span><o:p></o:p></p>
<p
style="margin:0cm;margin-bottom:.0001pt"><span
style="font-size:9.5pt">Errori
della sorgente dati:</span><o:p></o:p></p>
<p
style="margin:0cm;margin-bottom:.0001pt"><span
style="font-size:9.5pt">Errore
PostGIS nell'aggiunta
delle geometrie: ERROR:
cannot perform INSERT
RETURNING on relation
"v_frane_pol_full"</span><o:p></o:p></p>
<p
style="margin:0cm;margin-bottom:.0001pt"><span
style="font-size:9.5pt">HINT:
You need an
unconditional ON INSERT
DO INSTEAD rule with a
RETURNING clause.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a
href="mailto:Qgis-user@lists.osgeo.org"
target="_blank" moz-do-not-send="true">Qgis-user@lists.osgeo.org</a><br>
List info: <a
href="http://lists.osgeo.org/mailman/listinfo/qgis-user"
target="_blank" moz-do-not-send="true">
http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a
href="http://lists.osgeo.org/mailman/listinfo/qgis-user"
target="_blank" moz-do-not-send="true">
http://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></p>
</div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org"
moz-do-not-send="true">Qgis-user@lists.osgeo.org</a><br>
List info: <a
href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
target="_blank" moz-do-not-send="true">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a
href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
target="_blank" moz-do-not-send="true">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</blockquote>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
<br>
</body>
</html>