Re: [HACKERS] Bug in 9.0Alpha4

2010-03-17 Thread Tom Lane
Hitoshi Harada writes: > 2010/3/17 Tom Lane : >> When we were doing the ordered-aggregates patch, I considered passing >> all those values as explicit parameters to transformAggregateCall, >> and having it build the Aggref node from scratch and return it. >> However having seven or eight parameter

Re: [HACKERS] Bug in 9.0Alpha4

2010-03-17 Thread Gokulakannan Somasundaram
> > > When we were doing the ordered-aggregates patch, I considered passing > all those values as explicit parameters to transformAggregateCall, > and having it build the Aggref node from scratch and return it. > However having seven or eight parameters to transformAggregateCall > (and more in futu

Re: [HACKERS] Bug in 9.0Alpha4

2010-03-16 Thread Hitoshi Harada
2010/3/17 Tom Lane : > Gokulakannan Somasundaram writes: >>> transformSortClause is passed the untransformed aggorder list, which is >>> in fact a list of SortBy nodes, and it returns the transformed list >>> (SortGroupClause nodes), which is stored back into the aggorder field >>> a bit further d

Re: [HACKERS] Bug in 9.0Alpha4

2010-03-16 Thread Tom Lane
Gokulakannan Somasundaram writes: >> transformSortClause is passed the untransformed aggorder list, which is >> in fact a list of SortBy nodes, and it returns the transformed list >> (SortGroupClause nodes), which is stored back into the aggorder field >> a bit further down. > Right Tom. I got c

Re: [HACKERS] Bug in 9.0Alpha4

2010-03-16 Thread Gokulakannan Somasundaram
> > transformSortClause is passed the untransformed aggorder list, which is > in fact a list of SortBy nodes, and it returns the transformed list > (SortGroupClause nodes), which is stored back into the aggorder field > a bit further down. > > There are a number of regression tests that would fail

Re: [HACKERS] Bug in 9.0Alpha4

2010-03-16 Thread Tom Lane
Gokulakannan Somasundaram writes: >I noticed a problem with the source code of 9.0Alpha 4. In parse_agg.c, > there is a call made to transformSortClause. > ... >Here agg->aggorder should be a List of SortGroupClause pointers, whereas > transformSortClause expects the second argument as a l

Re: [HACKERS] Bug in 9.0Alpha4

2010-03-16 Thread Alvaro Herrera
Gokulakannan Somasundaram escribió: > Hi, >I noticed a problem with the source code of 9.0Alpha 4. In parse_agg.c, > there is a call made to transformSortClause. > > 00098 torder = transformSortClause > (

Re: [HACKERS] Bug in 9.0Alpha4

2010-03-16 Thread Gokulakannan Somasundaram
Hi, I think, this should be the probable fix. There is agg_order in ParseFuncOrColumn, which should get passed on to transformAggregateCall and that should be placed in this call, instead of agg->aggorder. Thanks, Gokul. On Tue, Mar 16, 2010 at 5:19 PM, Gokulakannan Somasundaram < gokul...@g

[HACKERS] Bug in 9.0Alpha4

2010-03-16 Thread Gokulakannan Somasundaram
Hi, I noticed a problem with the source code of 9.0Alpha 4. In parse_agg.c, there is a call made to transformSortClause. 00098 torder = transformSortClause (pstate, 00099 a