Re: PATCH: recursive json_populate_record()
Nikita Glukhov <n.gluhov@postgrespro.ru>
From: Nikita Glukhov <n.gluhov@postgrespro.ru>
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>,
Andres Freund <andres@anarazel.de>
Cc: David Steele <david@pgmasters.net>,
Michael Paquier <michael.paquier@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>,
Aleksander Alekseev <a.alekseev@postgrespro.ru>,
PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2017-05-22T19:19:37Z
Lists: pgsql-hackers
Attachments
- fix-thinko-in-JsObjectSize-macro.patch (text/x-patch) patch
- fix-jsonb_populate_record-behavior-on-non-objects.patch (text/x-patch) patch
Attached two small fixes for the previous committed patch: 1. I've noticed a difference in behavior between json_populate_record() and jsonb_populate_record() if we are trying to populate record from a non-JSON-object: json function throws an error but jsonb function returns a record with NULL fields. So I think it would be better to throw an error in jsonb case too, but I'm not sure. 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. -- Nikita Glukhov Postgres Professional:http://www.postgrespro.com The Russian Postgres Company
Commits
-
Make edge-case behavior of jsonb_populate_record match json_populate_record
- 68cff231e3a3 10.0 landed
-
Fix thinko in JsObjectSize() macro.
- e45c5be99d08 10.0 landed
-
Introduce convenience macros to hide JsonbContainer header accesses better.
- f7c624624029 10.0 landed