Dear pg-hackers,

Making an aggregate I want to stuff all input values (detoasted)
in an array and process them all togheter with finalfunc.

This is because in order to process them a conversion is involved
and I'm trying to reduce the number of conversions to the lowest
possible.

My question is: if I write in the "state" array
pointers to DETOASTED input args,
will I find them intact at finalfunc time ?

TIA

--strk;

Mon, 27 Oct 2003 14:26:24 +0100
strk <strk@keybit.net>
Aggregate detoasted arguments lifetime
strk <strk@keybit.net> writes:
> My question is: if I write in the "state" array
> pointers to DETOASTED input args,
> will I find them intact at finalfunc time ?

No, not without pushups.  You are called in a short-lived memory
context.  You could allocate query-lifetime memory in fcinfo->fn_mcxt,
but it's then your responsibility to ensure there are no undesirable
memory leaks.

			regards, tom lane

Mon, 27 Oct 2003 10:03:57 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Aggregate detoasted arguments lifetime 