Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFqIm-0000JM-8Z for pgsql-hackers@arkaria.postgresql.org; Tue, 30 May 2017 23:11:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dFqIl-0000ht-R2 for pgsql-hackers@arkaria.postgresql.org; Tue, 30 May 2017 23:11:47 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dFqIi-0000hB-05 for pgsql-hackers@postgresql.org; Tue, 30 May 2017 23:11:44 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFqIe-0005Pw-J6 for pgsql-hackers@postgresql.org; Tue, 30 May 2017 23:11:42 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 025EB21C070E; Wed, 31 May 2017 02:11:38 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru Received: from [10.100.236.30] (unknown [195.82.154.27]) by mail.postgrespro.ru (Postfix) with ESMTPSA id 956B621C0564; Wed, 31 May 2017 02:11:37 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1496185897; bh=ksYmJv/I1n7aIm1yA3hACs9nMJMH95p9EUbhHaoLC3o=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=RQQO/M8xqQqj4aeH1c0edOSQjsAfyZcUd9wUVI1WFGEAhpcx+WsUMXqB/lptPHmux EVOga5sb9IXidFgB4P3BEIJzSuzspL8ihGYVYMx6Z61KTvhHFxlSaNVJoYR0b1TJfR 9NVKV8WEhvydSqbuYCRPON7W0GRHkCTxTgrUvyRI= Subject: Re: PATCH: recursive json_populate_record() To: Tom Lane Cc: Andrew Dunstan , Andres Freund , David Steele , Michael Paquier , Aleksander Alekseev , PostgreSQL mailing lists References: <687e19a7-14e2-d0f5-2bff-35d62bc5c05a@postgrespro.ru> <934.1485111512@sss.pgh.pa.us> <9e21a39c-c1d7-b9b5-44a0-c5345a5029f6@postgrespro.ru> <13020.1485377905@sss.pgh.pa.us> <295ad4a5-2923-1834-5140-35d0b9a5818c@postgrespro.ru> <16179.1485380983@sss.pgh.pa.us> <9bf14a7c-0794-f90c-c012-8dd0335ab364@pgmasters.net> <754780af-d905-9704-cf4d-b64e632b86a3@2ndQuadrant.com> <20170403211741.7ommm5dssfv3abo6@alap3.anarazel.de> <45c0aa55-1b62-c622-31fd-cb21e017d5cd@2ndQuadrant.com> <8fcd9e65-acb0-8221-ef23-01e5c2fe90e4@2ndQuadrant.com> <10871.1496100705@sss.pgh.pa.us> From: Nikita Glukhov Organization: Postgres Professional Message-ID: Date: Wed, 31 May 2017 02:10:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <10871.1496100705@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 30.05.2017 02:31, Tom Lane wrote: > Nikita Glukhov 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers