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