[Portugal] postgre to qGIS

Hugo André Carvalho Poeira hpoeira gmail.com
Terça-Feira, 10 de Abril de 2012 - 14:40:05 EDT


Olá Pedro,

Faz como é indicado no link que o Giovanni te passou. Na clausula SELECT
acrescenta um campo ROWNUM AS ID, tipo:

SELECT ROWNUM AS ID, NAME, TIPO FROM A

O campo ROWNUM vai ser a tua chave primária da view.

Cumps,
Hugo Poeira



2012/4/10 Pedro Soares <pedro_gara  yahoo.com.br>

> olá
> 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:
>
> The view 'public.exercise_4' has no column suitable for use as a unique
> key.
>
> 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.
>
> The view you selected has the following columns, none of which satisfy the
> above conditions:
>
> 'dfe_code' derives from 'public.estudantes.dfe_code' and is not suitable
> (type is int4 and does not have a suitable constraint)
>
> 'geom' derives from 'public.escolas.geom' and is not suitable (type is
> geometry and does not have a suitable constraint)
>
> 'name' derives from 'public.escolas.name' and is not suitable (type is
> text and does not have a suitable constraint)
>
>
> o que está a faltar será o unique key... existe alguma forma de fazer:
> Create view blabla with OIDS?
>
> _______________________________________________
> Portugal mailing list
> Portugal  lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/portugal
>
>
-------------- próxima parte ----------
Um anexo em HTML foi limpo...
URL: http://lists.osgeo.org/pipermail/portugal/attachments/20120410/0c874236/attachment.html


Mais informações acerca da lista Portugal