otherwise, you can use an aggregate function on the id field. For instance min(emt_paradas.id) This is not a postgis problem, but a sql problem ;-) Cheers, Rémi-C
2014-11-26 19:47 GMT+01:00 Nicolas Ribot <nicolas.ri...@gmail.com>: > Hi, > > You can generate an id on-the-fly: > > SELECT 1 as id, ST_union(st_buffer(emt_paradas.geom, 500)) FROM > emt_paradas > > Nicolas > > On 26 November 2014 at 19:14, Luís Miguel Royo Pérez < > luis.miguel.r...@gmail.com> wrote: > >> Hi everyone, >> >> I'm trying to make a quite simple query in Postgis but I have problems >> with it. I just want to create a buffer dissolved of a set of points. Only >> that. >> >> This is the query I'm using: >> >> SELECT emt_paradas.id , ST_union(st_buffer(emt_paradas.geom, 500)) FROM >> emt_paradas >> >> but when I try to execute this, tells me the field emt_paradas.id must >> be in the clause group by but if I do that, the dissolve is not done. >> >> I'm in the DBManager of QGIS 2.6. I want to create this layer and load it >> in the canvas, for that DBManager asks me for an ID field, that's why I >> added emt_paradas.id in the select. If i remove it, Postgis creates the >> geometrybut I can't load it in the canvas. >> >> Any help or guidance will be apreciate. >> >> Thanks a lot!! >> >> >> >> >> _______________________________________________ >> postgis-users mailing list >> postgis-users@lists.osgeo.org >> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users >> > > > _______________________________________________ > postgis-users mailing list > postgis-users@lists.osgeo.org > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users >
_______________________________________________ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users