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

Nyall Dawson nyall.dawson at gmail.com
Thu Aug 11 01:39:35 PDT 2016


On 11 August 2016 at 18:37, Denis Rouzaud <denis.rouzaud at gmail.com> wrote:
>
> On 08/11/2016 10:36 AM, Nyall Dawson wrote:
>
> 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?
>
> yes!

It's http://hub.qgis.org/issues/15223 - pretty nasty, and I can't
think of a good (ie, not slow!) workaround. It's what pushed me back
to Qt4 builds for the present.

Nyall



>


More information about the Qgis-developer mailing list