Re: Aggregates with non-commutative transition functions - Mailing list pgsql-general

From Emmanuel Charpentier
Subject Re: Aggregates with non-commutative transition functions
Date
Msg-id b2nrqm$v41$1@news.hub.org
Whole thread Raw
In response to Re: Aggregates with non-commutative transition functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Aggregates with non-commutative transition functions
List pgsql-general
Tom Lane wrote:
> I said:
>
>>A better alternative is to get the planner to notice in the context of
>>the outer query that the inner query's result is already sorted by
>>recnum.  Then it wouldn't do the unwanted sort in any case.  This has
>>been on the to-do list for awhile, but hasn't risen to the top ...
>
>
> Now it has ... as of CVS tip, you can do

[ Nice demo ... ]

> Note the lack of an extra sort above the subquery.  This provides a
> general technique for controlling the ordering of inputs to a
> user-written aggregate function, even when grouping.

Schön ! I suppose that this has other fringe benefits for planning in
general ...

Thanks a lot ! I'll try to build a secondary PostgreSQL from CVS on a
development machine to test it.

Do you plan incorporation in some forthcoming 7.3.x ? Or push it back to 7.4 ?

                    Emmanuel Charpentier

pgsql-general by date:

Previous
From: "Colin Mangiagalli"
Date:
Subject: Transaction Logs Recycling Problem
Next
From: Dima Tkach
Date:
Subject: Re: Index not used with IS NULL