Hi Mathieu, Tim has a solution to bring a view into QGIS.
Here's the link. http://linfiniti.com/2011/11/adding-a-counter-to-postgresql-query-results/ Noli On 11/19/11, Mathieu Ouellette <[email protected]> wrote: > Hi, > > 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. > > 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. > > Does anybody have any idea on what could be causing this problem? > > Thanks a lot, > > Mathieu > _______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
