pgsql: Adjust src/include/utils/jsonapi.h so it's not backend-only. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Adjust src/include/utils/jsonapi.h so it's not backend-only.
Date
Msg-id E1iv3Nx-0001tg-44@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Fujii Masao
Date:
Subject: pgsql: Add pg_file_sync() to adminpack extension.
Next
From: Robert Haas
Date:
Subject: pgsql: Split JSON lexer/parser from 'json' data type support.