[Qgis-developer] incorrect feature IDs with Postgresql table without primary key

Nyall Dawson nyall.dawson at gmail.com
Thu Aug 11 01:36:53 PDT 2016


On 11 Aug 2016 6:27 PM, "Denis Rouzaud" <denis.rouzaud at gmail.com> wrote:
>
> Hi,
>
> I just noticed that feature.id() always return 1 when iterating on a
postgresql layer which has no single column primary key.
>
> Using the demo data qgis_test.book_authors, in console writing,
>
> for f in iface.activeLayer().getFeatures():
>   f.id()
>
> prints out
>
> 1
> 1
> 1
> 1
>
> Anyone knows where the issue come from?

Qt5 build?

Nyall

>
> Thanks,
>
> Denis
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160811/9d3facfc/attachment.html>


More information about the Qgis-developer mailing list