<div dir="ltr">Thanks for your input Vincent, I wasn't aware about that.<br><div><br></div><div>Rémi</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-22 13:44 GMT+02:00 Vincent Picavet <span dir="ltr"><<a href="mailto:vincent.ml@oslandia.com" target="_blank">vincent.ml@oslandia.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
Le mardi 22 avril 2014 10:10:13, Rémi Bovard a écrit :<br>
<div class="">> Hi Stefan,<br>
><br>
> Just a note, wouldn't it be better to have one table being given the 1-1<br>
> relationship?<br>
><br>
> In any case, with PostGIS you can create a view, add rules on it (update,<br>
> insert, delete) and the load this editable view in QGIS. Something like:<br>
><br>
> ON UPDATE TO <view> DO INSTEAD UPDATE <table> SET <attribute>=<br>
> new.<attribute><br>
<br>
</div>Rules on PostgreSQL are an old system and not recommended.<br>
It is advised to use triggers instead for this kind of use case.<br>
<br>
Note that latest PostgreSQL versions have automatic writeable views (for<br>
simple views), no need to do anything to activate it.<br>
<a href="http://www.postgresql.org/docs/9.3/static/sql-createview.html" target="_blank">http://www.postgresql.org/docs/9.3/static/sql-createview.html</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Vincent<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
><br>
> HTH<br>
><br>
> Rémi<br>
><br>
> 2014-04-22 9:47 GMT+02:00 matteo <<a href="mailto:matteo.ghetta@gmail.com">matteo.ghetta@gmail.com</a>>:<br>
> > -----BEGIN PGP SIGNED MESSAGE-----<br>
> > Hash: SHA1<br>
> ><br>
> > > my problem is that both of my layers are stored in a Postgis<br>
> > > database and it does not help me if I have to create a new layer<br>
> > > which would then not refer to the original tables anymore. Of<br>
> > > course, a workaround could be a new layer inside the database that<br>
> > > would then update the original tables with a trigger function. But<br>
> > > I was wondering if there is an easier way to go in QGIS.<br>
> ><br>
> > if your layers are stored in a PostGIS database I should give up.. For<br>
> > now I'm not a PostGIS guru.. :(<br>
> ><br>
> > good luck!<br>
> ><br>
> > Matteo<br>
> ><br>
> ><br>
> > -----BEGIN PGP SIGNATURE-----<br>
> > Version: GnuPG v1.4.12 (GNU/Linux)<br>
> > Comment: Using GnuPG with Icedove - <a href="http://www.enigmail.net/" target="_blank">http://www.enigmail.net/</a><br>
> ><br>
> > iQEcBAEBAgAGBQJTVh6fAAoJEBy7UYf0gaEOdNwH/imIlzH9qnUAbxxZOTPy/wka<br>
> > 6gawQvw21iLMlmOFD2g7PwhqjEvzW+fRkRTVzvGQnOIoJfM6bPirAf6zrTmY3znU<br>
> > 2lyJsEwdFSkABGHOfgelv6KwF/T2uBJqBJ6ourCIrGx2KWYTYR3EYV401+gaw6eh<br>
> > aHLBREQ7GyMbc7ERNqAVKuyuZ98Ya/TfT3lRBVJA9oWIGGkoEW7MS5/+Q4ge92sK<br>
> > 03hK+Hp+7wv5CVW7K8zbCQeaHcXc52sChU1YmW3Yl2Hu9vxyTuRA161gDbXEStXs<br>
> > qFxVH98ItTYk7Y2jiaTulJMp61Ktk8G7WN4RT8bgEsjpfB9h+kc4LhUMiaOrxFI=<br>
> > =dPqA<br>
> > -----END PGP SIGNATURE-----<br>
> > _______________________________________________<br>
> > Qgis-user mailing list<br>
> > <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
> > <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</div></div></blockquote></div><br></div></div>