summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
-rw-r--r--src/backend/utils/adt/jsonfuncs.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c
index c5e1a027956..41862872e8a 100644
--- a/src/backend/utils/adt/jsonfuncs.c
+++ b/src/backend/utils/adt/jsonfuncs.c
@@ -477,16 +477,16 @@ static Datum populate_domain(DomainIOData *io, Oid typid, const char *colname,
/* functions supporting jsonb_delete, jsonb_set and jsonb_concat */
static JsonbValue *IteratorConcat(JsonbIterator **it1, JsonbIterator **it2,
JsonbParseState **state);
-static JsonbValue *setPath(JsonbIterator **it, Datum *path_elems,
- bool *path_nulls, int path_len,
+static JsonbValue *setPath(JsonbIterator **it, const Datum *path_elems,
+ const bool *path_nulls, int path_len,
JsonbParseState **st, int level, JsonbValue *newval,
int op_type);
-static void setPathObject(JsonbIterator **it, Datum *path_elems,
- bool *path_nulls, int path_len, JsonbParseState **st,
+static void setPathObject(JsonbIterator **it, const Datum *path_elems,
+ const bool *path_nulls, int path_len, JsonbParseState **st,
int level,
JsonbValue *newval, uint32 npairs, int op_type);
-static void setPathArray(JsonbIterator **it, Datum *path_elems,
- bool *path_nulls, int path_len, JsonbParseState **st,
+static void setPathArray(JsonbIterator **it, const Datum *path_elems,
+ const bool *path_nulls, int path_len, JsonbParseState **st,
int level,
JsonbValue *newval, uint32 nelems, int op_type);
@@ -1528,7 +1528,7 @@ get_jsonb_path_all(FunctionCallInfo fcinfo, bool as_text)
}
Datum
-jsonb_get_element(Jsonb *jb, Datum *path, int npath, bool *isnull, bool as_text)
+jsonb_get_element(Jsonb *jb, const Datum *path, int npath, bool *isnull, bool as_text)
{
JsonbContainer *container = &jb->root;
JsonbValue *jbvp = NULL;
@@ -1676,7 +1676,7 @@ jsonb_get_element(Jsonb *jb, Datum *path, int npath, bool *isnull, bool as_text)
}
Datum
-jsonb_set_element(Jsonb *jb, Datum *path, int path_len,
+jsonb_set_element(Jsonb *jb, const Datum *path, int path_len,
JsonbValue *newval)
{
JsonbValue *res;
@@ -1718,8 +1718,8 @@ push_null_elements(JsonbParseState **ps, int num)
* Caller is responsible to make sure such path does not exist yet.
*/
static void
-push_path(JsonbParseState **st, int level, Datum *path_elems,
- bool *path_nulls, int path_len, JsonbValue *newval)
+push_path(JsonbParseState **st, int level, const Datum *path_elems,
+ const bool *path_nulls, int path_len, JsonbValue *newval)
{
/*
* tpath contains expected type of an empty jsonb created at each level
@@ -5201,8 +5201,8 @@ IteratorConcat(JsonbIterator **it1, JsonbIterator **it2,
* whatever bits in op_type are set, or nothing is done.
*/
static JsonbValue *
-setPath(JsonbIterator **it, Datum *path_elems,
- bool *path_nulls, int path_len,
+setPath(JsonbIterator **it, const Datum *path_elems,
+ const bool *path_nulls, int path_len,
JsonbParseState **st, int level, JsonbValue *newval, int op_type)
{
JsonbValue v;
@@ -5283,7 +5283,7 @@ setPath(JsonbIterator **it, Datum *path_elems,
* Object walker for setPath
*/
static void
-setPathObject(JsonbIterator **it, Datum *path_elems, bool *path_nulls,
+setPathObject(JsonbIterator **it, const Datum *path_elems, const bool *path_nulls,
int path_len, JsonbParseState **st, int level,
JsonbValue *newval, uint32 npairs, int op_type)
{
@@ -5422,7 +5422,7 @@ setPathObject(JsonbIterator **it, Datum *path_elems, bool *path_nulls,
* Array walker for setPath
*/
static void
-setPathArray(JsonbIterator **it, Datum *path_elems, bool *path_nulls,
+setPathArray(JsonbIterator **it, const Datum *path_elems, const bool *path_nulls,
int path_len, JsonbParseState **st, int level,
JsonbValue *newval, uint32 nelems, int op_type)
{