Re: Bug in 9.0Alpha4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gokulakannan Somasundaram <gokul007(at)gmail(dot)com>
Cc: pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in 9.0Alpha4
Date: 2010-03-16 19:56:01
Message-ID: 13490.1268769361@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gokulakannan Somasundaram <gokul007(at)gmail(dot)com> 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 confused, because the comment at Aggref struct definition
> told that it is a list of SortGroupClause. May be you can update your
> comments there.

I think that comment is fine. The reason this is confusing is that
ParseFuncOrColumn uses the Aggref node to carry a couple of things
that logically are input parameters to transformAggregateCall().
Although this affects nothing else and is commented at both ends,
apparently it's confusing anyway.

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?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2010-03-16 21:53:46 Re: Dyamic updates of NEW with pl/pgsql
Previous Message Pavel Stehule 2010-03-16 19:31:00 Re: parametrized NOTIFY - issue in plpgsql, maybe ToDo