[geos-devel] Re: [HACKERS] Aggregate detoasted arguments lifetime

strk strk at keybit.net
Mon Oct 27 10:39:37 EST 2003


tgl wrote:
> strk <strk at 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.

How do I allocate query-lifetime memory ?
How do I force arguments DETOASTing into this query-lifetime memory
(if I can at all) ?

What do I have to keep in mind about postgres version compatibility
issues ?

Thanks

PS: If this is a FAQ please point me to the answer

--strk;

> 
> 			regards, tom lane



More information about the geos-devel mailing list