"Thalis A. Kalfigopoulos" <[EMAIL PROTECTED]> writes:
> I worked on it so the struct state now has 3 fields: int length, int
> elem_count, int *elements. Now the issue is that the transition
> function, which I declare as strict, has a different input and state
> type (int4 and text respectively),
On Thu, 21 Jun 2001, Tom Lane wrote:
> "Thalis A. Kalfigopoulos" <[EMAIL PROTECTED]> writes:
> > I'm still a bit confused about how to declare the type of the transition state.
> > I have a structure that will hold the current state:
> > struct state {
> > int elem_count; //how many numbers h
"Thalis A. Kalfigopoulos" <[EMAIL PROTECTED]> writes:
> I'm still a bit confused about how to declare the type of the transition state.
> I have a structure that will hold the current state:
> struct state {
> int elem_count; //how many numbers have been assigned so far
> int *elem_are
On Tue, 19 Jun 2001, Tom Lane wrote:
> Peter Eisentraut <[EMAIL PROTECTED]> writes:
> > Sure, you create a (static) global variable and reallocate memory for it
> > in each call and free it by the finalizer function.
>
> A static would be a bad idea (consider a query with multiple instances
> of
"Thalis A. Kalfigopoulos" <[EMAIL PROTECTED]> writes:
> But the intermmediate state cannot hold multiple values in an array
> (can it?)
Sure, why not? Might not scale too well to lots of values, however.
regards, tom lane
---(end of broadcast)---
Hippl,
I'm interested in calculating the median of a set of numbers. The algorithm
requires that all values are known in advance (ie stored in an array). So the question
is: how can I store everything first in an array so I can later process it given that
I'd like this to be an aggregat