Thanks Regis, that was exactly the issue. The (boolean!) field 'inonderzoek' was used as a key. When I change that to 'gid' in the Add PostGIS Table dialog, everything works correctly.

Can anyone tell me why QGIS picks that boolean field for most of my tables? Can I change that behaviour by changing my database structure?

http://terglobo.nl/downloads/qgis_add_postgis_table_wrong_key.png

And how can the identify results be correct anyway?

Tnx,
Raymond


dbname='bag' host=localhost port=5432 user='postgres' sslmode=disable key='inonderzoek' estimatedmetadata=true srid=28992 type=POLYGON table="bagactueel"."pandactueelbestaand" (geovlak) sql=



On 26-03-15 10:34, Régis Haubourg wrote:
Hi, I have seen such troubles when the choosen primary key from qgis side is
not unique .

Symptoms: selecting one feature select severals unrelated features of the
same layer. relation with attributes is broken also.

Can you check in your layer's definition (general tab of layer properties)
if you choose gid field as key, and check if it is really unique in postgis?

Cheers
Régis



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/wrong-attribute-values-for-postgis-data-in-Feature-attribute-form-tp5195518p5195523.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer


--
Terglobo
Ampèrestraat 110
5223 CT 's-Hertogenbosch
06-25314983
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to