[Qgis-developer] Postgis Spatial Views - problems with primary keys

Alexandre Neto senhor.neto at gmail.com
Mon Mar 10 05:03:54 PDT 2014


In Valmiera, I started to have problems with QGIS using postgis spatial

Adding a spatial view using the browser throws the following error:

"The layer dbname='postgis' host= port=5432 user='postgres'
> password='postgres' sslmode=disable key='cadeado' srid=3763 type=POINT
> table="PGHP"."infra_portoes" (geom) sql= is not a valid layer and can not
> be added to the map"

Adding the spatial view using the "add postgis layer", the layer can be
added (sometimes) but with odd behaviors.

I then noticed that using the last method, QGIS fails to identify a good
candidate for a primary key. Selecting it in the primary key, solves the

Using DB Manager (add layer to canvas), QGIS sucessfully identify the
possible primary key and everything goes well.

I think this was not happening in 2.0.1. Can anyone confirm this?

Best Regards,

Alexandre Neto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140310/81318aa6/attachment.html>

More information about the Qgis-developer mailing list