Re: Question about MemoryContexts and functions that returns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Hallgren <thomas(at)tada(dot)se>
Cc: David Fetter <david(at)fetter(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Question about MemoryContexts and functions that returns
Date: 2006-03-21 21:14:32
Message-ID: 29467.1142975672@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Hallgren <thomas(at)tada(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2006-03-21 21:26:55 Re: qsort, once again
Previous Message Tom Lane 2006-03-21 21:10:21 Re: [GENERAL] A real currency type