[Qgis-user] Loading filtered database table as temp layer

Thayer Young thayeray at yahoo.com
Mon May 3 15:22:15 PDT 2021


 Hi Michael,
You may want to explain your question more, as I am not sure what you mean by temporary.Are you sure this is a QGIS question and not a PostgreSQL user permissions question? 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?
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.
-Thayer   

> Date: Mon, 3 May 2021 18:12:16 +0000
> From: Michael Gieding <michael.gieding at live.de>
> To: QGIS-User Mailinglist <qgis-user at lists.osgeo.org>
> Subject: [Qgis-user] Loading filtered database table as temp layer
> Message-ID <AS8P191MB1752DCD9FC45BA48FEAA9F57E55B9 at AS8P191MB1752.EURP191.PROD.OUTLOOK.COM>    
> Content-Type: text/plain; charset="iso-8859-1"

> Hallo erverybody,

> I'm looking for a solution where users can load the output of a sql statement from PostgreSQL as > temporary layer.
> The tool should be as easy as possible, as the target group is not very experienced in QGIS. Means > there should be some
> defined fields to enter values for filtering and an ok-button to create the desired layer.

> One idea I tried, is to create a workflow in the graphical modelbuilder in QGIS. In the moment it works > to create a new layer
> with the desired SQL-statement. I used the algorithms "PostgreSQL SQL execute and load" --> > "Load Layer to project".
> But I can't find an option to load the output of the statement as a temporary. The result is like a > loaded statement from
> the database manager. So the users would work with the original data within the database.
> Does anyone has got an idea to achieve this? Maybe I've overseen something.

> Of course a separate plugin would do the thing, but with my skills it's way more difficult to achieve.
> So I would be happy to solve the problem the "easy way".

> Any (other) hint is welcome.


> Many thanks in advance.

> Michael Gieding  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210503/bbdb9ca0/attachment.html>


More information about the Qgis-user mailing list