Re: [HACKERS] PATCH: recursive json_populate_record() - Mailing list pgsql-hackers

From Nikita Glukhov
Subject Re: [HACKERS] PATCH: recursive json_populate_record()
Date
Msg-id fa7e4877-e324-e730-a5b7-b1850c01e283@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] PATCH: recursive json_populate_record()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 30.05.2017 02:31, Tom Lane wrote:

> Nikita Glukhov <n.gluhov@postgrespro.ru> writes:
>> 2. Also I've found a some kind of thinko in JsGetObjectSize() macro, but it
>> seems that this obvious mistake can not lead to incorrect behavior.
> Hm, I think it actually was wrong for the case of jsonb_cont == NULL,
> wasn't it?

Yes, JsObjectIsEmpty() returned false negative answer for jsonb_cont == NULL,
but this could only lead to suboptimal behavior of populate_record() when the
default record value was given.

> But maybe that case didn't arise for the sole call site.
It also seems to me that populate_record() can't be called now with
jsonb_cont == NULL from the existing call sites.

-- 
Nikita Glukhov
Postgres Professional:http://www.postgrespro.com
The Russian Postgres Company




pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces
Next
From: Masahiko Sawada
Date:
Subject: [HACKERS] An incomplete comment sentence in subtrans.c