Re: Problem with tupdesc in jsonb_to_recordset

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2018-07-11T11:30:48Z
Lists: pgsql-bugs, pgsql-hackers
On Wed, Jul 11, 2018 at 11:38:46AM +0100, Andrew Gierth wrote:
> My first approach - assuming that update_cached_tupdesc has good reason
> to make a copy, which I'm not convinced is the case - would be to simply
> make a per-query-context copy of the tupdesc to assign to rsi.setDesc in
> order to conform to the call protocol.

I see what you are coming at here, thanks for the input.  I am not
really convinced that update_cached_tupdesc needs to do a new copy
either, but let's see what Tom has to say on the matter.  That's his
feature and his code.
--
Michael

Commits

  1. Fix crash in json{b}_populate_recordset() and json{b}_to_recordset().

  2. Support domains over composite types.