Re: Question about MemoryContexts and functions that returns - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Question about MemoryContexts and functions that returns
Date
Msg-id 29467.1142975672@sss.pgh.pa.us
Whole thread Raw
In response to Re: Question about MemoryContexts and functions that returns  (Thomas Hallgren <thomas@tada.se>)
Responses Re: Question about MemoryContexts and functions that returns  (Thomas Hallgren <thomas@tada.se>)
List pgsql-hackers
Thomas Hallgren <thomas@tada.se> writes:
> As it turns out, I'm not supposed to allocate the returned tuple in the 
> caller context.

Where do you get that from?  plpgsql and plperl both do it that way AFAICS.

Are you testing in an --enable-cassert build?  The memory-clobber
behavior that that turns on is really essential for finding
dangling-pointer problems ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] A real currency type
Next
From: Greg Stark
Date:
Subject: Re: qsort, once again