pgsql: Split out code into new getKeyJsonValueFromContainer()

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Split out code into new getKeyJsonValueFromContainer()
Date: 2019-09-20 23:23:03
Message-ID: E1iBSEx-0003ET-Ix@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Split out code into new getKeyJsonValueFromContainer()

The new function stashes its output value in a JsonbValue that can be
passed in by the caller, which enables some of them to pass
stack-allocated structs -- saving palloc cycles. It also allows some
callers that know they are handling a jsonb object to use this new jsonb
object-specific API, instead of going through generic container
findJsonbValueFromContainer.

Author: Nikita Glukhov
Discussion: https://postgr.es/m/7c417f90-f95f-247e-ba63-d95e39c0ad14@postgrespro.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1a2983231d9080bfa06cfbf38d5415b5d71eea91

Modified Files
--------------
src/backend/utils/adt/jsonb_util.c | 143 ++++++++++++++++++++++++-------------
src/backend/utils/adt/jsonfuncs.c | 52 +++++---------
src/include/utils/jsonb.h | 3 +
3 files changed, 113 insertions(+), 85 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-09-20 23:27:57 Re: PGCOLOR? (Re: pgsql: Unified logging system for command-line programs)
Previous Message Alvaro Herrera 2019-09-20 22:37:20 pgsql: Refactor code into new JsonbValueAsText, and use it more