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

2012-11-07 Thread Pietro Rossin
@Anna123 ** so something like: select row_number() over(order by geom)::integer as no, ST_Union(ST_Buffer(geom,500) ) as geom from public.mytable group by geom; should also work. yes, this work, but I loose the union process and I get a buffer for each feature in mytab

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

2012-11-07 Thread aho
Hi Pietro, I had the same in a project with a view. Solved it by using the function row_number which can be used as long as it is a usual integer: CREATE OR REPLACE VIEW cadastre.districtviewAS SELECT row_number() OVER (ORDER BY d.gid)::integer AS no, d.districtcode, d.geom, count(p.gid) asc

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

2012-11-06 Thread Bernhard Ströbl
Hi Pietro, what I do in similar cases (creating Views, not sure if it works with SQL layer) is: SELECT min(my_pk_column), ST_Union(ST_Buffer(geom,500) as geom FROM public.mytable Bernhard Am 07.11.2012 08:38, schrieb Pietro Rossin: Hi all I tried to load in Qgis, by using fast SQL layer, a

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

2012-11-06 Thread Pietro Rossin
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