On 02.09.2017 23:34, Even Rouault wrote:

>

> Ok makes sense. Though as far as QGIS goes, is there a case where a

> subset query can result in duplicates?

Could happen. The code currently handles the possibility where subsetString() is called with a completely custom SELECT statement, so potentially doing crazy things.

Ok, so if we only do this for non-select queries, we should be safe?

>

> Something like this [1] seems to fix the issue, don't know if it's the

> best way forward though?

I've left a few comments in the commit

Many thanks. I've pushed a revised version at [1]. I'm in doubt whether it is really worth the hassle to hide the orig_ogr_fid column in the fields, together with the firstFieldIsFid it looks like it could make things very fragile... As far as I can tell, just the modifications in [1] without the extra logic should be pretty robust.

[1] https://github.com/manisandro/QGIS/commit/82a56eaa5a48a10a1a656657cefd84b619eae3f2

Sandro
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to