Re: [Qgis-user] unique id in postgis view

2012-06-18 Thread Bernhard Ströbl
Hi Richard, AFAIK QGIS needs a field which is defined as primary key field in one of the tables contained in the view. If this is the case the values in the field must be unique, too. Bernhard Am 18.06.2012 04:17, schrieb Richard Greenwood: QGIS wants a unique id on postgis layers, so I

Re: [Qgis-user] unique id in postgis view

2012-06-18 Thread Giuseppe Sucameli
Hi, On Mon, Jun 18, 2012 at 8:47 AM, Bernhard Ströbl bernhard.stro...@jena.de wrote: AFAIK QGIS needs a field which is defined as primary key field in one of the tables contained in the view. If this is the case the values in the field must be unique, too. it depends on the QGis version

[Qgis-user] unique id in postgis view

2012-06-17 Thread Richard Greenwood
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