How to extract nodes with PostGIS to a multipoint geometry
I had a similar problem and this mailing list post helped me:
http://lists.osgeo.org/pipermail/postgis-users/2010-June/026887.html
The solution they came up with is as follows:
SELECT gid, ST_AsText(replace(ST_AsEWKT(geom), 'LINESTRING',
'MULTIPOINT')::geometry)
FROM
(SELECT 1 as gid, 'LINESTRING (0 0, 0 3, 3 4)'::geometry AS geom
UNION ALL
SELECT 2 as gid, 'LINESTRING (1 1, 2 6, 7 7)'::geometry AS geom) AS g;