Re: Problem with tupdesc in jsonb_to_recordset

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Problem with tupdesc in jsonb_to_recordset
Date: 2018-07-11 07:39:16
Message-ID: 20180711073916.GD14301@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs 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 Content-Type Size
jsonfunc-composite-mcxt.patch text/x-diff 1.8 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Taiki Kondo 2018-07-11 07:58:26 RE: Typo in Japanese translation of psql.
Previous Message Michael Paquier 2018-07-11 06:27:13 Re: Problem with tupdesc in jsonb_to_recordset

Browse pgsql-hackers by date

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