[Qgis-user] Virtual Layer not working correct when opening QGIS project

Isenmann, Werner (RPF) Werner.Isenmann at rpf.bwl.de
Tue Aug 19 00:55:37 PDT 2025


Hi Brent,

thanks for your hint. I already tried this. Since now Cross Database references (the tables are in different databases) aren’t allowed, so this solutions doesn’t work now.and we have to change the PostGIS settings for this solution.
Or are there other possibilities?

Werner


Von: Brent Wood <Brent.Wood at niwa.co.nz>
Gesendet: Dienstag, 19. August 2025 09:21
An: qgis-user at lists.osgeo.org; Isenmann, Werner (RPF) <Werner.Isenmann at rpf.bwl.de>
Betreff: EXTERN: Re: Virtual Layer not working correct when opening QGIS project

Phishing-Gefahr: Vorsicht bei Links und Anhängen in externen E-Mails!




Hi,

You could try creating a view in the PostGIS database to do the join instead of QGIS, then just open the view in QGIS?

Brent Wood

Principal Technician, Fisheries
NIWA
DDI:  +64 (4) 3860529
________________________________
From: QGIS-User <qgis-user-bounces at lists.osgeo.org> on behalf of Isenmann, Werner (RPF) via QGIS-User <qgis-user at lists.osgeo.org>
Sent: Tuesday, 19 August 2025 18:37
To: qgis-user at lists.osgeo.org <qgis-user at lists.osgeo.org>
Subject: [Qgis-user] Virtual Layer not working correct when opening QGIS project


Hello,



in a QGIS project I have a PostGIS polygon layer where I joined two tables (from PostgrSQL DB). Then I created a virtual layer, containing all the attributes of the polygon layer and all the attributes of the joined tables. This works well so far.



When I close the QGIS project an open it again, the virtual layer attribute table first doesn’t show the joined attributes. They only appear, when I save the virtual layer again with the same select statement.

Does anyone have any tips on how to ensure that the virtual layer permanently retains the joined attributes?



Thanks in advance,

Werner



---



Werner Isenmann



Regierungspräsidium Freiburg

Referat 91 – Geowissenschaftliches Landesservicezentrum



Albertstraße 5

D-79104 Freiburg i. Br.



Phone: (+49) 761 208-3008

E-Mail: Werner.Isenmann at rpf.bwl.de<mailto:Werner.Isenmann at rpf.bwl.de>



Brent Wood
Principal Technician - GIS and Spatial Data Management
+64-4-386-0529
301 Evans Bay Parade Hataitai Wellington New Zealand
Earth Sciences New Zealand
[Das Bild wurde vom Absender entfernt. Earth Sciences New Zealand]<https://earthsciences.nz>
The Institute of Geological and Nuclear Sciences Limited and the National Institute of Water and Atmospheric Research Limited joined to become the New Zealand Institute for Earth Science Limited. We are known as Earth Sciences New Zealand. For more information on the Earth Sciences transition click here<https://niwa.co.nz/about-niwa/science-sector-reforms>.

Notice: This email may contain information which is confidential and/or subject to copyright, and may not be used, published or redistributed without the prior written consent of Earth Sciences New Zealand. If you are not the intended recipient, please immediately notify the sender and delete the email and any attachments. Any opinion or views expressed in this email are those of the individual sender and may not represent those of Earth Sciences New Zealand.

For information about how we process data and monitor communications please see our privacy policy<https://niwa.co.nz/about-niwa/privacy-policy>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20250819/99f6f1bf/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ~WRD000.jpg
Type: image/jpeg
Size: 823 bytes
Desc: ~WRD000.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20250819/99f6f1bf/attachment-0001.jpg>


More information about the QGIS-User mailing list