-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Description:
When working with multiple PostGIS layers in QGIS project, the plugin stops processing layers at the point where it encounters layers based on complex SQL views (WITH clause, window functions, etc.).
Steps to reproduce:
- Create a QGIS project with mixture of:
- Regular PostGIS layers (table-based)
- PostGIS layers based on complex SQL views (using WITH clause, window functions, ST_Buffer, etc.)
- Open changeDataSource plugin
- Try to change datasource for all layers
Current behavior:
- Plugin only shows and processes layers up to the first SQL view layer
- When trying to process selected layers after SQL view layer, it throws error:
Traceback (most recent call last):
File ".../changeDataSource.py", line 385, in replaceDS
scope.setFeature(next(self.layersPropLayer.getFeatures(QgsFeatureRequest(row+1))))
StopIteration
Expected behavior:
- Plugin should either:
a) Handle SQL view layers correctly, or
b) Skip SQL view layers but continue processing subsequent layers, or
c) Show clear warning that SQL view layers are not supported
Example of problematic layer source:
table="(SELECT row_number() OVER () AS fid, * FROM ( WITH dissolved AS (...) SELECT ..., ST_Buffer((ST_Dump(merged_geom)).geom,0) AS geom FROM dissolved) AS _subq_1_)"Environment:
QGIS version: 3.34.0-Prizren
Plugin version: 3.1
OS: Windows 10
Metadata
Metadata
Assignees
Labels
No labels