Re: Bug in 9.0Alpha4

Поиск
Список
Период
Сортировка
Искать

Re: Bug in 9.0Alpha4

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:

Re: Bug in 9.0Alpha4

От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:

Re: Bug in 9.0Alpha4

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:

Bug in 9.0Alpha4

От:
Gokulakannan Somasundaram <gokul007@gmail.com>
Дата:

Re: Bug in 9.0Alpha4

От:
Gokulakannan Somasundaram <gokul007@gmail.com>
Дата:
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 <gokul007@gmail.com> wrote:
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 agg->aggorder,
00100 &tlist,
00101 true /* fix unknowns */ ,
00102 true /* force SQL99 rules */ );
00103


   Here agg->aggorder should be a List of SortGroupClause pointers, whereas transformSortClause expects the second argument as a list of SortBy pointers. I verified the doxygen code by downloading the 9.0alpha4 version. I am trying to understand this piece of code, while i thought i should report this bug.

Thanks,
Gokul.

Re: Bug in 9.0Alpha4

От:
Gokulakannan Somasundaram <gokul007@gmail.com>
Дата:


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 in obvious ways
if this code didn't work.

Right Tom.  I got confused, because the comment at Aggref struct definition told that it is a list of SortGroupClause. May be you can update your comments there.

Thanks,
Gokul.

Re: Bug in 9.0Alpha4

От:
Gokulakannan Somasundaram <gokul007@gmail.com>
Дата:

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 future if we ever add more features here) didn't really
seem to be better style than abusing Aggref a bit.  But maybe it is
the best way after all.  Thoughts?


I feel it would be good, if we send the parameters explicitly and if that increases, put it inside another structure(data carriage structure) and send it.. But please take my suggestion as a novice one. :))

Thanks,
Gokul.

Re: Bug in 9.0Alpha4

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:

Re: Bug in 9.0Alpha4

От:
Hitoshi Harada <umi.tanuki@gmail.com>
Дата:
FAQ