On Fri, 27 Mar 2009, Dimitri Fontaine wrote:
> Maybe it's just that I didn't devote enough time to reading your detailed
> explanation above, but this part sounds like it could be done in an aggregate
> you'd use in a correlated subquery containing the right ORDER BY, couldn't
> it?
> http://www.postgresql.org/docs/8.3/interactive/sql-createaggregate.html
Can you return multiple rows from an aggregate function?
Matthew
--