<div>Hi,</div><div><br></div><div>I have a PostGIS database and I'm trying to load some views in QGIS 1.7 but it doesn't work. The error message title is in French but basically it says that QGIS can't find an appropriate primary key. The message regarding the column which would normally acts as a primary key is in French again but it says that is not suitable because its type is int4 and it doesn't have constraints.</div>
<div><br></div><div>However, this column has a primary key constraint in the base table, has a unique constraint and is set to NOT NULL... I also created a test view in which the select query is identical to the base table (no joins, no alias, ...) and the same error happens (while the base table is loading perfectly). In order to push further, I made a SELECT DISTINCT query on my id column and a SELECT COUNT(DISTINCT my_id_column) on both the base table and the test view and I got the same numbers so the values of this column are really unique. I also loaded my views in uDig and I got no problem. </div>
<div><br></div><div>Does anybody have any idea on what could be causing this problem?</div><div><br></div><div>Thanks a lot,</div><div><br></div><div>Mathieu</div><div><br></div>