"Josh Berkus" <josh(at)agliodbs(dot)com> writes:
> As I said in my previous e-mail, I appear to have gotten the list to
> order itself by basing it on an (ordered) sub-select. Since the DB is
> only 50% populated right now, I'm not sure that's working perfectly but
> I'll keep you posted.
Yes, that oughta work fine to determine the order of inputs to the
aggregate function. ORDER BY in sub-selects is a new feature (heck,
sub-selects in FROM at all is a new feature) in 7.1, so this trick
wasn't available when Richard and I discussed the issue before.
regards, tom lane