Oops sorry I didn't read it carefully enough! Regards
Tim On Fri, Jan 10, 2020, 8:03 AM Alessandro Pasotti <apaso...@gmail.com> wrote: > > > On Thu, Jan 9, 2020 at 11:26 PM Tim Sutton <t...@kartoza.com> wrote: > >> >>> >>> In particular, me an Nyall have been chatting about adding a method to >>> factory a QgsVectorLayer from a generic SQL query, the issues I see is that >>> we need a PK (at least for PG) and how to decide the geometry column if >>> there are more than one. >>> >> >> I wonder if you could just transparently add row_number[1] to the query >> to give each row a unique id? >> >> Regards >> >> Tim >> >> [1] https://www.postgresqltutorial.com/postgresql-row_number/ >> >> > > Hi Tim, > > the example query I pasted in my original email does exactly that: > (SELECT row_number().... > > we just need a bit of login to determine when/if we have to make that > trick. > > > -- > Alessandro Pasotti > w3: www.itopen.it >
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer