pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Adjust src/include/utils/jsonapi.h so it's not backend-only.
Date: Fri, 24 Jan 2020 18:08:49 +0000
Message-ID: <E1iv3Nx-0001tg-44@gemulon.postgresql.org> (raw)

Adjust src/include/utils/jsonapi.h so it's not backend-only.

The major change here is that we no longer include jsonb.h into
jsonapi.h. The reason that was necessary is that jsonapi.h included
several prototypes functions in jsonfuncs.c that depend on the Jsonb
type. Move those prototypes to a new header, jsonfuncs.h, and include
it where needed.

The other change is that JsonEncodeDateTime is now declared in
json.h rather than jsonapi.h.

Taken together, these steps eliminate all dependencies of jsonapi.h
on backend-only data types and header files, so that it can
potentially be included in frontend code.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ce0425b162d0a8c168e1fbab5324fb1cbca4b6b7

Modified Files
--------------
src/backend/tsearch/to_tsany.c     |  1 +
src/backend/tsearch/wparser.c      |  1 +
src/backend/utils/adt/jsonb_util.c |  1 +
src/backend/utils/adt/jsonfuncs.c  |  1 +
src/include/utils/json.h           |  2 ++
src/include/utils/jsonapi.h        | 33 -------------------------
src/include/utils/jsonfuncs.h      | 49 ++++++++++++++++++++++++++++++++++++++
7 files changed, 55 insertions(+), 33 deletions(-)



Message-ID: <E1iv3Nx-0001tg-44@gemulon.postgresql.org>
Permalink:  ../E1iv3Nx-0001tg-44@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iv3Nx-0001tg-44@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Adjust src/include/utils/jsonapi.h so it's not backend-only.
  In-Reply-To: <E1iv3Nx-0001tg-44@gemulon.postgresql.org>
  References: <E1iv3Nx-0001tg-44@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox