Dear Lionel,

AFAIK the view must contain a field being defined as primary key in the underlying table, moreover this field must be of type integer. The view must be defined in a way that every element (thus every primary-key value) is unique. In case the view contains a join resulting in several primary-key fields you can choose which one QGIS should use. So your view definition lacks the primary-key field, although the sequence - of course - populates gid with unique values. Maybe you could post the complete view definition (and the table definitions, too) and we could see if we could help you in creating a working view.

regards

Benno

Lionel Roubeyrie schrieb:
Hi all,
I can't load datas from a postgis view, the loader complains about no
uniques values and int4 type, however the view starts with "SELECT
nextval('my_seq'::regclass)::integer AS gid, com.the_geom, ..." (the
gid column is not listed in the error message) which works perfectly
if datas are stored in a table. Is there a trick to load datas from
views, and more generally is it possible to force the postgis provider
to create an internal unique key?
Thanks



________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to