tgl wrote:
> strk <[EMAIL PROTECTED]> writes:
> >> From whitin an aggregate sfunc I did:
> > oldcontext = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt);
> > geom = (GEOMETRY *)PG_DETOAST_DATUM(datum);
> > MemoryContextSwitchTo(oldcontext);
>
> > And later in aggregate's fi
strk <[EMAIL PROTECTED]> writes:
>> From whitin an aggregate sfunc I did:
> oldcontext = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt);
> geom = (GEOMETRY *)PG_DETOAST_DATUM(datum);
> MemoryContextSwitchTo(oldcontext);
> And later in aggregate's finalfunc:
> pfree(ge
>From whitin an aggregate sfunc I did:
oldcontext = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt);
geom = (GEOMETRY *)PG_DETOAST_DATUM(datum);
MemoryContextSwitchTo(oldcontext);
And later in aggregate's finalfunc:
pfree(geom);
Result:
segfault!
What's wro