[Qgis-developer] qgis freezes when opening attribute table of a postgis layer without key value

Régis Haubourg regis.haubourg at eau-adour-garonne.fr
Mon May 26 11:30:47 PDT 2014


OK, we have the problem each time we have a int primary key on a table, but
only in our production database. (pgpool2 + 2 pg replicating). dropping the
constraint restore normal behaviour.... 

We are dumping the prod and restoring it in a new instance to check what
happens. 

In QGIS provider code, it seems that primary key is not recognized (and it
doesn't appear in connection string on qgis side). In that case, the
delimiter between field is not set , and query set in cursor for attribute
table or identify is like "Select myfield1::text myfield2::integer from
mytable". The query is malformed so the cursor fails and qgis tries another
cursor infinitly. We couldn't find what is different between test database
and production database that could explain why QGIS can't interpret that the
same way.


Régis



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/qgis-freezes-when-opening-attribute-table-of-a-postgis-layer-without-key-value-tp5141587p5142588.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list