[Qgis-user] How to load postgis layer without gid (if possible..)?

Pietro Rossin pierigis at gmail.com
Tue Nov 6 23:38:43 PST 2012


Hi all

I tried to load in Qgis, by using fast SQL layer, a query like this:

SELECT (select ST_Union(ST_Buffer(geom,500)) FROM public.mytable) as geom;

This query make a buffer of the features in mytable and union them in a
single polygon (if contiguous).

It works in pgadmin and in openjump but not in Qgis, because Qgis need a
unique value (integer) column coming from the query.

Of course I can make a SELECT INTO mynewtable adding a serial field "gid",
but if I have a lot of steps to perform my spatial analysis I fill my db
with a lot of temp data.

So, is there some way to make a "volatile" integer unique field in the above
query so Qgis will be happy with it ;-)?

I'm using Qgis 1.8 Postgis 2

Thanks
Pietro



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-load-postgis-layer-without-gid-if-possible-tp5014459.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.



More information about the Qgis-user mailing list