diff options
author | Robert Haas <rhaas@postgresql.org> | 2020-01-24 09:58:37 -0800 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2020-01-24 09:58:37 -0800 |
commit | ce0425b162d0a8c168e1fbab5324fb1cbca4b6b7 (patch) | |
tree | fcd8aa4030cc4b0b8b460a1f41c0aa7282d7e4c4 /src/backend | |
parent | d694e0bb793ebd6b392e6ef6a3b0a59ae66cbc95 (diff) |
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.
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/tsearch/to_tsany.c | 1 | ||||
-rw-r--r-- | src/backend/tsearch/wparser.c | 1 | ||||
-rw-r--r-- | src/backend/utils/adt/jsonb_util.c | 1 | ||||
-rw-r--r-- | src/backend/utils/adt/jsonfuncs.c | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/tsearch/to_tsany.c b/src/backend/tsearch/to_tsany.c index cc694cda8cd..adf181c191f 100644 --- a/src/backend/tsearch/to_tsany.c +++ b/src/backend/tsearch/to_tsany.c @@ -17,6 +17,7 @@ #include "tsearch/ts_utils.h" #include "utils/builtins.h" #include "utils/jsonapi.h" +#include "utils/jsonfuncs.h" typedef struct MorphOpaque diff --git a/src/backend/tsearch/wparser.c b/src/backend/tsearch/wparser.c index 6b5960ecc15..c7499a94ac6 100644 --- a/src/backend/tsearch/wparser.c +++ b/src/backend/tsearch/wparser.c @@ -21,6 +21,7 @@ #include "tsearch/ts_utils.h" #include "utils/builtins.h" #include "utils/jsonapi.h" +#include "utils/jsonfuncs.h" #include "utils/varlena.h" /******sql-level interface******/ diff --git a/src/backend/utils/adt/jsonb_util.c b/src/backend/utils/adt/jsonb_util.c index 7c9da701ddd..b33c3ef43ce 100644 --- a/src/backend/utils/adt/jsonb_util.c +++ b/src/backend/utils/adt/jsonb_util.c @@ -19,6 +19,7 @@ #include "utils/builtins.h" #include "utils/datetime.h" #include "utils/hashutils.h" +#include "utils/json.h" #include "utils/jsonapi.h" #include "utils/jsonb.h" #include "utils/memutils.h" diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c index 38758a626b2..2f9955d665a 100644 --- a/src/backend/utils/adt/jsonfuncs.c +++ b/src/backend/utils/adt/jsonfuncs.c @@ -29,6 +29,7 @@ #include "utils/json.h" #include "utils/jsonapi.h" #include "utils/jsonb.h" +#include "utils/jsonfuncs.h" #include "utils/lsyscache.h" #include "utils/memutils.h" #include "utils/syscache.h" |