Re: BUG #15514: process fails on jsonb_populate_recordset query. see simple example below

Andrew Gierth <andrew@tao11.riddles.org.uk>

From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: 4321ip@gmail.com, pgsql-bugs@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2018-11-21T02:47:47Z
Lists: pgsql-bugs
>>>>> "Haribabu" == Haribabu Kommi <kommi.haribabu@gmail.com> writes:

 Haribabu> when the data is NULL, there is no data to populate and the
 Haribabu> tupleDesc is not updated. Accessing of NULL pointer leads to
 Haribabu> crash. Attached quick simple patch fixes the problem.

Yes, that's an oversight in 4984784f836 (from Tom) which fixed a
_different_ crash here.

Tom: I can take this one if you want?

-- 
Andrew (irc:RhodiumToad)


Commits

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