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 <[email protected]> wrote: > From: Marc Jansen <[email protected]> > Subject: Re: [postgis-users] PostGIS view in qgis > To: [email protected], "PostGIS Users Discussion" > <[email protected]> > 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 > > [email protected] > > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
