Re: Detection of nested function calls - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Detection of nested function calls
Date
Msg-id 3500.1382713288@sss.pgh.pa.us
Whole thread Raw
In response to Re: Detection of nested function calls  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Detection of nested function calls  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2013-10-25 10:18:27 -0400, Tom Lane wrote:
>> I think the right way to attack it is to create some way for a Datum
>> value to indicate, at runtime, whether it's a flat value or an in-memory
>> representation.

> That sounds reasonable, and we have most of the infrastructure for it
> since the "indirect toast" thing got in.

Oh really?  I hadn't been paying much attention to that, but obviously
I better go back and study it.

> I've thought about refcounting Datums several times, but I always got
> stuck when thinking about how to deal memory context resets and errors.
> Any ideas about that?

Not yet.  But it makes no sense to claim that a Datum could have a
reference that's longer-lived than the memory context it's in, so
I'm not sure the context reset case is really a problem.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: logical changeset generation v6.4
Next
From: Hugo Mercier
Date:
Subject: Re: Detection of nested function calls