Re: Sorting an aggregated column - Mailing list pgsql-sql

From Tom Lane
Subject Re: Sorting an aggregated column
Date
Msg-id 15732.1080019044@sss.pgh.pa.us
Whole thread Raw
In response to Sorting an aggregated column  ("David Witham" <davidw@unidial.com.au>)
List pgsql-sql
"David Witham" <davidw@unidial.com.au> writes:
> This output is correct in this case but there is no guarantee that the
> answers will come out in "question" order. I can't see how to
> incorporate sorting by the "question" column using this approach.

As of PG 7.4 you can reliably use a sorted sub-select to determine the
order of inputs to a user-defined aggregate function.  See for instance
http://archives.postgresql.org/pgsql-general/2003-02/msg00917.php
        regards, tom lane


pgsql-sql by date:

Previous
From: "David Witham"
Date:
Subject: Sorting an aggregated column
Next
From: "David Witham"
Date:
Subject: Re: Sorting an aggregated column