<html><head></head><body><div class="ydpa8e56a0ayahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
        <div dir="ltr" data-setdir="false">Hi <span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">Michael,</span></span></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><br></span></span></div><div dir="ltr" data-setdir="false">You may want to explain your question more, as I am not sure what you mean by temporary.</div><div dir="ltr" data-setdir="false">Are you sure this is a QGIS question and not a PostgreSQL user permissions question? </div><div dir="ltr" data-setdir="false">Are you trying to prevent your users from creating new views in the database or alter QGIS projects stored in the database, or something else?</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">If you use DB Manager the layers you load exist in your QGIS project not in your database. True they have access to the original data but it is not write access unless you set up triggers to allow the view to be editable.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">-Thayer</div>
        
        </div><div id="ydp9d467d2ayahoo_quoted_0708241925" class="ydp9d467d2ayahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div><br></div><div><br></div><div><div dir="ltr">> Date: Mon, 3 May 2021 18:12:16 +0000<br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>From: Michael Gieding <<a href="mailto:michael.gieding@live.de" rel="nofollow" target="_blank">michael.gieding@live.de</a>><br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>To: QGIS-User Mailinglist <<a href="mailto:qgis-user@lists.osgeo.org" rel="nofollow" target="_blank">qgis-user@lists.osgeo.org</a>><br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>Subject: [Qgis-user] Loading filtered database table as temp layer<br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>Message-ID <<a href="mailto:AS8P191MB1752DCD9FC45BA48FEAA9F57E55B9@AS8P191MB1752.EURP191.PROD.OUTLOOK.COM" rel="nofollow" target="_blank">AS8P191MB1752DCD9FC45BA48FEAA9F57E55B9@AS8P191MB1752.EURP191.PROD.OUTLOOK.COM</a>></div><div dir="ltr">    <br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>Content-Type: text/plain; charset="iso-8859-1"<br></div><div dir="ltr"><br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>Hallo erverybody,<br></div><div dir="ltr"><br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>I'm looking for a solution where users can load the output of a sql statement from PostgreSQL as <span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>temporary layer.<br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>The tool should be as easy as possible, as the target group is not very experienced in QGIS. Means <span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>there should be some<br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>defined fields to enter values for filtering and an ok-button to create the desired layer.<br></div><div dir="ltr"><br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>One idea I tried, is to create a workflow in the graphical modelbuilder in QGIS. In the moment it works <span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>to create a new layer<br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>with the desired SQL-statement. I used the algorithms "PostgreSQL SQL execute and load" --> <span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>"Load Layer to project".<br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>But I can't find an option to load the output of the statement as a temporary. The result is like a <span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>loaded statement from<br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>the database manager. So the users would work with the original data within the database.<br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>Does anyone has got an idea to achieve this? Maybe I've overseen something.<br></div><div dir="ltr"><br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>Of course a separate plugin would do the thing, but with my skills it's way more difficult to achieve.<br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>So I would be happy to solve the problem the "easy way".<br></div><div dir="ltr"><br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>Any (other) hint is welcome.<br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>Many thanks in advance.<br></div><div dir="ltr"><br></div><div dir="ltr" data-setdir="false"><span><span style="color: rgb(38, 40, 42); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">> </span></span>Michael Gieding</div></div>
            </div>
        </div></body></html>