[postgis-users] postgis collect() issue
Michael Fuhr
mike at fuhr.org
Wed Jul 12 09:37:47 PDT 2006
On Wed, Jul 12, 2006 at 12:22:23AM -0700, Zhiqiang Zhang wrote:
> I tried the suggestion with the following query but
> got an error:
>
> Query:
> select collect(Geom(dump(the_geom))) as geom from
> roads where the_geom && setSRID('BOX3D(-121.934769
> 37.355285,-121.894769 37.395285)'::BOX3D, -1) group by
> name;
>
> Error: set-valued function called in context that
> cannot accept a set
Does this do what you want?
SELECT name, collect(geom)
FROM (
SELECT name, geom(dump(the_geom))
FROM roads
WHERE ...
) AS s
GROUP BY name;
--
Michael Fuhr
More information about the postgis-users
mailing list