The collect() function should do what you want... it is documented at:
http://postgis.refractions.net/docs/x927.html

SELECT collect( the_geom ) FROM the_table WHERE the_condition = true;

Chris

Quoting Paul Ramsey <pramsey@refractions.net>:
> -------- Original Message --------
> Subject: postGIS examples
> Date: Sun, 28 Sep 2003 23:19:30 +0200
> From: Karlis <karlis@cc.baremetal.com>
> To: pramsey@refractions.net
> 
> 
> Hello, I'm working on a location-awareness system for wi-fi devices here
> at the University of Tennessee, and the database is built on
> postgreSQL/postGIS.  I'm finding the documentation very minimal when it
> comes to db queries.  Do you know of a source of openGIS sql examples?
> Perhaps you could wiki-ize the documentation on your site so that users
> can contribute examples also?
> 
> For example, my problem right now:  I have a table full of points.  I
> would like a multipoint geometry of points returned by a select
> statement, but the only way I understand to do this now is to select a
> list of points, then outside postgres in my script, create the
> multipoint text, and select a Mpointfromtext() from the database.  Am I
> missing something?
> 
> Any help appreciated.
> 
> cheers
> karlis
> 
> 
> --
>        __
>       /
>       | Paul Ramsey
>       | Refractions Research
>       | Email: pramsey@refractions.net
>       | Phone: (250) 885-0632
>       \_
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 





