[postgis-users] PostGIS view in qgis
pcreso at pcreso.com
pcreso at pcreso.com
Mon Mar 9 22:14:15 PDT 2009
Hi Martin,
I missed your original post, but caught this reply.
Grab the key from the underlying geometry table, & use it for a key column in your aggregate view, eg:
create view v1 as select min(key) as key, ...
It might work OK for you. Each record in your aggregate view will have the min(key) of all the records in each aggregate record, so the key uniqueness is retained in the view.
Cheers,
Brent Wood
--- On Mon, 3/9/09, Marc Jansen <jansen.marc at gmx.de> wrote:
> From: Marc Jansen <jansen.marc at gmx.de>
> Subject: Re: [postgis-users] PostGIS view in qgis
> To: martin.fafard at geoprojection.com, "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> Date: Monday, March 9, 2009, 8:43 PM
> HI Martin,
>
>
> Martin Fafard schrieb:
> > Hi
> >
> > I polygonize linestrings in a view to see the result
> in qgis. But qgis need gid. How can I create the gid column
> after an aggregate function in a view?
>
> AFAIK you can't. Maybe a table (created by your query)
> with a serial / primary key helps.
>
> --Marc
>
>
>
> >
> > Martin F
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> >
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list