I have a line in a PostGIS table test_line
. I want to extract it's nodes into a multipoint geometry.
I tried the following:
SELECT ST_Collect((ST_DumpPoints(the_geom)).geom) FROM test_line;
But it gives me the error ERROR: set-valued function called in context that cannot accept a set
.
What do I have to change in order to get it to work?