Thalis A. Kalfigopoulos writes:
> So is there a way I can actually have a variable (the array with the elements) maintained between calls of the same
function?I'm trying to figure how to design the aggregate's state_function that will do the element accumulation
(beforeactually passing this array to the final to calculate the median).
Sure, you create a (static) global variable and reallocate memory for it
in each call and free it by the finalizer function.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter