I would like to merge overlapping buffers created in PostGIS and have as many polygons as there are not overlapping merged buffers, that can be viewed in QGIS. The answer of Creating dissolved buffers in QGIS using PostGIS seems to be on the right path, but I do not understand what g is in the query:

CREATE VIEW buffer40units AS 

   g.path[1] as gid, 
   g.geom::geometry(Polygon, 31492) as geom 

     (ST_Dump(ST_UNION(ST_Buffer(geom, 40)))).* 
   FROM point
) as g;
  • By merge you mean union/dissolve? Can you add a screenshot?
    – BERA
    Feb 12, 2022 at 13:40

1 Answer 1


g refers to the sub-query:

     (ST_Dump(ST_UNION(ST_Buffer(geom, 40)))).* 
   FROM point

point in that is the input layer, that is being buffered.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.