Introduce convenience macros to hide JsonbContainer header accesses better.
Tom Lane <tgl@sss.pgh.pa.us>
Introduce convenience macros to hide JsonbContainer header accesses better. This improves readability a bit and may make future improvements easier. In passing, make sure that the JB_ROOT_IS_XXX macros deliver boolean (0/1) results; the previous coding was a bug hazard, though no actual bugs are known. Nikita Glukhov, extended a bit by me Discussion: https://postgr.es/m/9e21a39c-c1d7-b9b5-44a0-c5345a5029f6@postgrespro.ru
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/jsonb_util.c | modified | +7 −7 |
| src/backend/utils/adt/jsonfuncs.c | modified | +2 −2 |
| src/include/utils/jsonb.h | modified | +11 −5 |
Discussion
- PATCH: recursive json_populate_record() 27 messages · 2016-12-13 → 2017-05-30