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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
Cc: 4321ip(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15514: process fails on jsonb_populate_recordset query. see simple example below
Date: 2018-11-22 20:21:20
Message-ID: 6764.1542918080@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> writes:
> Accessing of NULL pointer leads to crash. Attached quick simple patch fixes
> the problem.

While that stops the crash, it doesn't do what we want, which is to
return a valid tupdesc. Without that you get "set-valued function called
in context that cannot accept a set" errors. I think the right fix is
to force a call of update_cached_tupdesc so that there always is a
tupdesc to copy.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nurmurat Gurbanliyew 2018-11-22 20:51:08 PostgreSQL v11 offline (portable) version libwinpthread-1.dll error
Previous Message PG Bug reporting form 2018-11-22 18:40:08 BUG #15517: JSONB_BUILD_ARRAY and JSON_BUILD_ARRAY omit XML Declaration (if present) from XML colums