Re: [GENERAL] Order By for aggregate functions (Simulating Group_concat)

2005-09-01 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > On Thu, Sep 01, 2005 at 05:14:41PM +0200, Martijn van Oosterhout wrote: >> SELECT aggregate(field) FROM (SELECT field FROM xxx ORDER BY wherever) x; > I've occasionally relied on this but I've never been completely > comfortable with it. Is there any gua

Re: [GENERAL] Order By for aggregate functions (Simulating Group_concat)

2005-09-01 Thread Michael Fuhr
On Thu, Sep 01, 2005 at 05:14:41PM +0200, Martijn van Oosterhout wrote: > On Thu, Sep 01, 2005 at 10:04:12AM +0100, Charlotte Pollock wrote: > > What I want to be able to do is pass and order by field to the aggregate so > > I can be certain I get the list of strings in the correct order. > > Orde

Re: [GENERAL] Order By for aggregate functions (Simulating Group_concat)

2005-09-01 Thread Tom Lane
Charlotte Pollock <[EMAIL PROTECTED]> writes: > I'm trying to create a aggregate function similar 9but not identical) to > mysql's group_concat. > What I want to be able to do is pass and order by field to the aggregate so > I can be certain I get the list of strings in the correct order. The way

Re: [GENERAL] Order By for aggregate functions (Simulating Group_concat)

2005-09-01 Thread Martijn van Oosterhout
On Thu, Sep 01, 2005 at 10:04:12AM +0100, Charlotte Pollock wrote: > Hi All > > I'm trying to create a aggregate function similar 9but not identical) to > mysql's group_concat. > > What I want to be able to do is pass and order by field to the aggregate so > I can be certain I get the list of str

[GENERAL] Order By for aggregate functions (Simulating Group_concat)

2005-09-01 Thread Charlotte Pollock
Hi All I'm trying to create a aggregate function similar 9but not identical) to mysql's group_concat. What I want to be able to do is pass and order by field to the aggregate so I can be certain I get the list of strings in the correct order. Does anyone have any ideas how this could be done? In