QGIS wants a unique id on postgis layers, so I created a view that includes:

   ROW_NUMBER() OVER (ORDER BY mytable.ogc_fid ASC) AS row_num,

which seems to be a standard way to create a unique id on a view [1]
but QGIS does not "see" the row_num, i.e. it is not listed in the "No
Suitable Key Column" dialog box that lists the columns in the view and
explains why each is unsuitable.

What am I doing wrong?

Thanks,
Rich


[1] 
http://gis.stackexchange.com/questions/12233/in-postgis-is-it-possible-to-create-a-view-with-a-unique-id

-- 
Richard Greenwood
richard.greenw...@gmail.com
www.greenwoodmap.com
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to