olá<div>Criei as queries (das questões de ontem). e fiz três views para representar no QGIS... acontece que qd as tento adicionar no QGIS dá-me o seguinte erro:</div><div><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px">
The view 'public.exercise_4' has no column suitable for use as a unique key.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px"></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px">Qgis requires that the view has a column that can be used as a unique key. Such a column should be derived from a table column of type int4 and be a primary key, have a unique constraint on it, or be a PostgreSQL oid column. To improve performance the column should also be indexed.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px"></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px">The view you selected has the following columns, none of which satisfy the above conditions:</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px">'dfe_code' derives from 'public.estudantes.dfe_code' and is not suitable (type is int4 and does not have a suitable constraint)</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px">'geom' derives from 'public.escolas.geom' and is not suitable (type is geometry and does not have a suitable constraint)</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px">'name' derives from '<a href="http://public.escolas.name">public.escolas.name</a>' and is not suitable (type is text and does not have a suitable constraint)</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px"><br></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px">o que está a faltar será o unique key... existe alguma forma de fazer: Create view blabla with OIDS?</p>
</div>