<div dir="ltr"><p dir="ltr">You can add views from the add postgis layer but your view must have a few tweaks. </p>
<p dir="ltr">First, add an Id, even if a fake id with rownumber () over ().</p>
<p dir="ltr">Then, you need to explicitly cast your geometry and CRS.  Therefore use this instead<br></p>
<p dir="ltr">ST_DumpPoints(geom).geom::geometry('point',your_EPSG_code)<br>
</p>
<br><div class="gmail_quote"><div dir="ltr">A 17h06 Ter, 20 de Out de 2015, Clifford Snow <<a href="mailto:clifford@snowandsnow.us" target="_blank">clifford@snowandsnow.us</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 20, 2015 at 7:35 AM, Piotr Kania <span dir="ltr"><<a href="mailto:p.kania@op.pl" target="_blank">p.kania@op.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="overflow:hidden">In my postgis database I have multipolygon layer 'public.polygons' (gid,geom), I'd like to see vertices of those layer during editing, that's why I thought of postgis view. I create that in database:<br>
<br>
CREATE VIEW points_of_polygons AS SELECT ST_DumpPoints(geom) AS geom FROM public.polygons;<br>
<br>
But I can't add that view to Qgis, I found that info:</div></blockquote></div><br></div></div><div dir="ltr"><div class="gmail_extra">Views are not selectable from the Add PostGIS icon. But starting in version 2.10 you can add the view points_of_polygons by using the DB Manager. A unique id is no longer required. If you are using an earlier version then you'll need to create a unique row number. The stackexchange link you provided gives an example of using ROWNUMBER() OVER() to create the unique id. </div></div><div dir="ltr"><div class="gmail_extra"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>@osm_seattle<br></div><div><a href="http://osm_seattle.snowandsnow.us" target="_blank">osm_seattle.snowandsnow.us</a></div><div>OpenStreetMap: Maps with a human touch</div></div></div>
</div></div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div></div>