"Hitoshi Harada" <umi.tanuki@gmail.com> writes:
> Correct. I learned that method from nodeAgg. What I meant was that
> window functions reach for plan node and its sort keys through
> winstate->ss.ps. The mechanism is not ugly but some macros or exposed
> API seem more comfortable, especially if thinking about formulating
> window functions as user-defined functions.
Agreed, I was about to suggest the same thing. Have the window
functions pass the WindowState to some interface code that gets what
they need for them.
regards, tom lane