<div dir="auto"><div dir="auto">Laurent and list,</div><br><br><div class="gmail_quote gmail_quote_container" dir="auto"><div dir="ltr" class="gmail_attr">On Tue, Sep 30, 2025, 07:14 celati Laurent via QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">
Dear all,<div><br>I work with qgis and postgis. I would like to perform a "dissolve": </div><div><a href="https://docs.qgis.org/3.40/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#dissolve" target="_blank" rel="noreferrer">https://docs.qgis.org/3.40/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#dissolve</a><br><br>in keeping/preserving  all attributes values ? For instance : a kind of aggregation/concatenation within new "output features" ?</div><div><br></div><div>I Saw this post :</div><div><a href="https://www.aproposinfosystems.com/en/about/blog/managing-attributes-postgis-dissolve/" target="_blank" rel="noreferrer"> https://www.aproposinfosystems.com/en/about/blog/managing-attributes-postgis-dissolve/</a><br><br>I have tried to reproduce the proposal with my postgis table containing several polygons<br><span style="background-color:rgb(204,204,204)"><br><i>SELECT <br>min(union_v4.max_hierar) as id, <br>array_agg(<a href="http://union_v4.id" target="_blank" rel="noreferrer">union_v4.id</a>) as ids, <br>union_v6.geom<br>FROM <br>union_v4, <br>(SELECT <br>(ST_Dump(St_multi(ST_Union(geom)))).geom as geom <br>FROM union_v6<br>WHERE <br>st_intersects(union_v4.geom, union_v6.geom)<br>GROUP BY union_v6.geom</i></span><br><br>But i obtain :<br><br><i><span style="background-color:rgb(204,204,204)">ERROR: syntax error at the end of the entry<br>LINE 12: GROUP BY union_v6.geom <br>^<br>ERROR: syntax error at the end of the entry<br>SQL state: 42601<br>Characters: 285</span></i></div><div></div></div></div></blockquote></div><div dir="auto"><br></div><div dir="auto">I'm on my phone and squinting a bit here but aren't you missing a right parenthesis? Ending your correlated sub query?</div><div class="gmail_quote gmail_quote_container" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><br></div></div></div>
</blockquote></div></div>