Re: Aggregate detoasted arguments lifetime

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: strk <strk(at)keybit(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, geos-devel(at)geos(dot)refractions(dot)net
Subject: Re: Aggregate detoasted arguments lifetime
Date: 2003-10-27 15:03:57
Message-ID: 29243.1067267037@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

strk <strk(at)keybit(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-10-27 15:22:32 Defaults for GUC variables (was Re: pg_ctl reports succes when start fails)
Previous Message Jan Wieck 2003-10-27 13:45:20 Re: Still a few flaws in configure's default CFLAGS selection