From: "Archibald Zimonyi" <archie@netg.se>
> One way is to create your own aggregate function. See the reference manual
> under CREATE AGGREGATE.
Thank you.
http://www.postgresql.org/idocs/index.php?sql-createaggregate.html
And indeed Chris's LIST() aggregate does almost exactly what I want. I
don't think it was there last time I tried to figure out CREATE AGGREGATE.
The examples on that page are very helpful.
Julian