Re: Problem with tupdesc in jsonb_to_recordset - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Problem with tupdesc in jsonb_to_recordset
Date
Msg-id 20180711073916.GD14301@paquier.xyz
Whole thread Raw
In response to Re: Problem with tupdesc in jsonb_to_recordset  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Problem with tupdesc in jsonb_to_recordset  (Dmitry Dolgov <9erthalion6@gmail.com>)
Re: Problem with tupdesc in jsonb_to_recordset  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-hackers
On Wed, Jul 11, 2018 at 03:27:13PM +0900, Michael Paquier wrote:
> I don't think that your solution is correct.  From my read of 37a795a6,
> the tuple descriptor is moved from the query-lifespan memory context
> (ecxt_per_query_memory) to a function-level context, which could cause
> the descriptor to become busted as your test is pointing out.  Tom?

Hacking my way out I am finishing with the attached, which fixes the
problem and passes all regression tests.  I am not completely sure that
this the right approach though, I would need to think a bit more about
it.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: In pageinspect, perform clean-up after testing gin-related functions
Next
From: Dave Page
Date:
Subject: Re: How can we submit code patches that implement our (pending) patents?