<div dir="ltr"><div class="gmail_default" style="font-size:small">I've changed the heading to better represent the content. See PR <a href="https://github.com/qgis/QGIS-Documentation/pull/2322">https://github.com/qgis/QGIS-Documentation/pull/2322</a></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Regards,</div><div class="gmail_default" style="font-size:small">Anita</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 12, 2018 at 10:57 AM, Andreas Neumann <span dir="ltr"><<a href="mailto:a.neumann@carto.net" target="_blank">a.neumann@carto.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>Hi all,</p>
<p>I agree with Richard. Thanks for referencing the PG docs. Normally, materialized views are not meant to be manipulated (insert/update/delete). They are usually used to improve performance of complex queries.</p>
<p>Yes - with the power of PostgreSQL one could probably somehow also update also materialized views (with rules and triggers) - but in most cases it would not make sense and I wouldn't encourage it.</p>
<p>Greetings,<br>Andreas</p><div><div class="h5">
<p>On 2018-01-12 10:41, Richard Duivenvoorde wrote:</p>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div class="m_8214775112819175446pre" style="margin:0;padding:0;font-family:monospace">Hi,<br> <br> just because I stumbled upon this last month:<br> <br> A materialized view is originally just a table based on a query. So you<br> should not update the 'view' as upon a refresh, those edits will be<br> overwritten.<br> <br> Postgresql has an 'official' materialized view<br> <br> <a href="https://www.postgresql.org/docs/9.3/static/sql-creatematerializedview.html" rel="noopener noreferrer" target="_blank">https://www.postgresql.org/<wbr>docs/9.3/static/sql-<wbr>creatematerializedview.html</a><br> <br> which you can 'refresh' using a query:<br> <br> <a href="https://www.postgresql.org/docs/9.3/static/sql-refreshmaterializedview.html" rel="noopener noreferrer" target="_blank">https://www.postgresql.org/<wbr>docs/9.3/static/sql-<wbr>refreshmaterializedview.html</a><br> <br> I think the heading in the training_manual should be something like:<br> 'rule based updates' or so?<br> <br> Regards,<br> <br> Richard Duivenvoorde<br> <br> <br> <br> On 11-01-18 23:32, Tim Sutton wrote:
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">Hi<br> <br> I (or whoever wrote it) could probably have chosen a better example.<br> Materialised views change something that is normally read only (a view)<br> into something that can be treated as a writable table (with the correct<br> transactions being deferred to the tables that were used to create the<br> view). So agreed we should either change the example or the heading :-)<br> <br> Regards<br> <br> Tim<br> <br>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">On 11 Jan 2018, at 23:24, Anita Graser <<a href="mailto:anitagraser@gmx.at" target="_blank">anitagraser@gmx.at</a><br> <mailto:<a href="mailto:anitagraser@gmx.at" target="_blank">anitagraser@gmx.at</a>>> wrote:<br> <br> Hi,<br> <br> I'm wondering about the term <br> ​"<br> Materialised Views (Rule based views)<br> ​" in the lesson about rules:​<br> ​<br> <a href="https://docs.qgis.org/testing/en/docs/training_manual/database_concepts/rules.html" rel="noopener noreferrer" target="_blank">https://docs.qgis.org/testing/<wbr>en/docs/training_manual/<wbr>database_concepts/rules.html</a><br> <br> Maybe I'm missing something, but it doesn't seem like the example has<br> anything to do with views. It's a nice rule that writes into a regular<br> table, as far as I can tell. <br> <br> It would be good to provide an example that deals with inserting data<br> into a view. <br> <br> What do you think about changing the subheading to "Creating a logging<br> rule"?<br> <br> Regards,<br> Anita<br> ______________________________<wbr>_________________<br> Qgis-community-team mailing list for organizing community resources<br> such as documentation, translation etc..<br> <a href="mailto:Qgis-community-team@lists.osgeo.org" target="_blank">Qgis-community-team@lists.<wbr>osgeo.org</a><br> <mailto:<a href="mailto:Qgis-community-team@lists.osgeo.org" target="_blank">Qgis-community-team@<wbr>lists.osgeo.org</a>><br> <a href="https://lists.osgeo.org/mailman/listinfo/qgis-community-team" rel="noopener noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>community-team</a></blockquote>
<br> —<br> <br> <br> <br> <br> <br> <br> *Tim Sutton*<br> <br> *Co-founder:* Kartoza<br> *Project chair:* QGIS.org <<a href="http://QGIS.org" rel="noopener noreferrer" target="_blank">http://QGIS.org</a>><br> <br> Visit <a href="http://kartoza.com" rel="noopener noreferrer" target="_blank">http://kartoza.com</a> <<a href="http://kartoza.com/" rel="noopener noreferrer" target="_blank">http://kartoza.com/</a>> to find out about open<br> source:<br> <br> Desktop GIS programming services<br> Geospatial web development<br> GIS Training<br> Consulting Services<br> <br> *Skype*: timlinux <br> *IRC:* timlinux on #qgis at <a href="http://freenode.net" target="_blank">freenode.net</a> <<a href="http://freenode.net" rel="noopener noreferrer" target="_blank">http://freenode.net</a>><br> <br> <br> <br> ______________________________<wbr>_________________<br> Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..<br> <a href="mailto:Qgis-community-team@lists.osgeo.org" target="_blank">Qgis-community-team@lists.<wbr>osgeo.org</a><br> <a href="https://lists.osgeo.org/mailman/listinfo/qgis-community-team" rel="noopener noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>community-team</a><br> </blockquote>
<br> ______________________________<wbr>_________________<br> Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..<br> <a href="mailto:Qgis-community-team@lists.osgeo.org" target="_blank">Qgis-community-team@lists.<wbr>osgeo.org</a><br> <a href="https://lists.osgeo.org/mailman/listinfo/qgis-community-team" rel="noopener noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>community-team</a></div>
</blockquote>
<p><br></p>

</div></div></div>
</blockquote></div><br></div>