Re: [HACKERS] ffunc called multiple for same value

2004-07-23 Thread Tom Lane
Ian Burrell <[EMAIL PROTECTED]> writes: > We are doing things in the aggregates that make them troublesome when > called the ffunc is called multiple times. The state structure uses a > lot of memory for intermediate work. The memory needs to be freed as > soon as possible otherwise there is a

Re: [HACKERS] ffunc called multiple for same value

2004-07-23 Thread Ian Burrell
Tom Lane wrote: So I'm rather inclined to define this behavior as "not a bug". The fact that you're complaining seems to indicate that your ffunc scribbles on its input, which is bad programming practice in any case. Ordinarily I would not think that an ffunc should have any problem with being ex

Re: [HACKERS] ffunc called multiple for same value

2004-07-23 Thread Mike Mascari
Tom Lane wrote: So I'm rather inclined to define this behavior as "not a bug". The fact that you're complaining seems to indicate that your ffunc scribbles on its input, which is bad programming practice in any case. Ordinarily I would not think that an ffunc should have any problem with being ex

Re: [HACKERS] ffunc called multiple for same value

2004-07-23 Thread Tom Lane
Ian Burrell <[EMAIL PROTECTED]> writes: > I posted a message a couple weeks ago abou having a problem with a > user-defined C language aggregate and the ffunc being called multiple > times with the same state. I came up with a test case which shows the > problem with plpgsql functions. It occ

[HACKERS] ffunc called multiple for same value

2004-07-22 Thread Ian Burrell
I posted a message a couple weeks ago abou having a problem with a user-defined C language aggregate and the ffunc being called multiple times with the same state. I came up with a test case which shows the problem with plpgsql functions. It occurs with an aggregate in an inner query, when a