Re: [HACKERS] pointer scope and memory contexts

2008-11-06 Thread Tom Lane
"Tim Keitt" <[EMAIL PROTECTED]> writes: > [questions] Switching memory contexts, in itself, only switches which context a bare palloc() will allocate from (as opposed to MemoryContextAlloc). It cannot have some magic impact on the validity of existing pointers. > One last question: if I call SPI

Re: [HACKERS] pointer scope and memory contexts

2008-11-06 Thread Pavan Deolasee
On Thu, Nov 6, 2008 at 7:01 AM, Tim Keitt <[EMAIL PROTECTED]> wrote: > I am working on a set returning function and have a question about > switching memory contexts. Basically, what I want to know is whether > memory allocated in one context can be referenced when a different > context is current.

[HACKERS] pointer scope and memory contexts

2008-11-05 Thread Tim Keitt
I am working on a set returning function and have a question about switching memory contexts. Basically, what I want to know is whether memory allocated in one context can be referenced when a different context is current. The docs give examples like: if (SRF_IS_FIRSTCALL()) { fun