Re: add more frame types in window functions (ROWS) - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: add more frame types in window functions (ROWS)
Date
Msg-id 87my1vhhm9.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: add more frame types in window functions (ROWS)  (Hitoshi Harada <umi.tanuki@gmail.com>)
Responses Re: add more frame types in window functions (ROWS)
List pgsql-hackers
>>>>> "Hitoshi" == Hitoshi Harada <umi.tanuki@gmail.com> writes:
Hitoshi> Attached is updated version. I added AggGetMemoryContext()Hitoshi> in executor/nodeAgg.h (though I'm not sure
whereto go...)Hitoshi> and its second argument "iswindowagg" is output parameter toHitoshi> know whether the call
contextis Agg or WindowAgg. YourHitoshi> proposal of APIs to know whether the function is called asHitoshi> Aggregate
ornot is also a candidate to be, but it seems outHitoshi> of this patch scope, so it doesn't touch anything.
 

I don't really like the extra argument; aggregate functions should
almost never have to care about whether they're being called as window
functions rather than aggregate functions. And if it does care, I
don't see why this is the appropriate function for it. At the very
least the function should accept NULL for the "iswindowagg" pointer to
avoid useless variables in the caller.

So for this and the regression test problem mentioned in the other mail,
I'm setting this back to "waiting on author".

-- 
Andrew.


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Hot standby, recent changes
Next
From: Simon Riggs
Date:
Subject: Re: Hot standby, recent changes