Re: PATCH: recursive json_populate_record()

From: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, David Steele <david(at)pgmasters(dot)net>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: recursive json_populate_record()
Date: 2017-05-30 23:10:34
Message-ID: fa7e4877-e324-e730-a5b7-b1850c01e283@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 30.05.2017 02:31, Tom Lane wrote:

> Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-05-30 23:39:55 Re: [PATCH] Fixed malformed error message on malformed SCRAM message.
Previous Message Mark Dilger 2017-05-30 22:50:04 Re: Use of non-restart-safe storage by temp_tablespaces