Re: Composite Datums containing toasted fields are a bad idea(?) - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Composite Datums containing toasted fields are a bad idea(?)
Date
Msg-id 20140425151309.GB24957@awork2.anarazel.de
Whole thread Raw
In response to Re: Composite Datums containing toasted fields are a bad idea(?)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Composite Datums containing toasted fields are a bad idea(?)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 2014-04-24 19:40:30 -0400, Tom Lane wrote:
> * Because HeapTupleGetDatum might allocate a new tuple, the wrong thing
> might happen if the caller changes CurrentMemoryContext between
> heap_form_tuple and HeapTupleGetDatum.

It's fscking ugly to allocate memory in a PG_RETURN_... But I don't
really have a better backward compatible idea :(

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Composite Datums containing toasted fields are a bad idea(?)
Next
From: Greg Stark
Date:
Subject: Re: UUIDs in core WAS: 9.4 Proposal: Initdb creates a single table