diff options
| author | Peter Eisentraut | 2023-10-10 05:50:15 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2023-10-10 05:50:43 +0000 |
| commit | 1d91d24d9a831be0bb90ec71934f735c52456c57 (patch) | |
| tree | 47c9ba51a493bb78cf6695fdf815ea15d2ca24f5 /src/include/utils | |
| parent | fc4089f3c65a5f1b413a3299ba02b66a8e5e37d0 (diff) | |
Add const to values and nulls arguments
This excludes any changes that would change the external AM APIs.
Reviewed-by: Aleksander Alekseev <aleksander@timescale.com>
Discussion: https://www.postgresql.org/message-id/flat/14c31f4a-0347-0805-dce8-93a9072c05a5%40eisentraut.org
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/json.h | 8 | ||||
| -rw-r--r-- | src/include/utils/jsonb.h | 8 | ||||
| -rw-r--r-- | src/include/utils/tuplesort.h | 2 | ||||
| -rw-r--r-- | src/include/utils/tuplestore.h | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/include/utils/json.h b/src/include/utils/json.h index 35a9a5545d8..f07e82c8327 100644 --- a/src/include/utils/json.h +++ b/src/include/utils/json.h @@ -21,11 +21,11 @@ extern void escape_json(StringInfo buf, const char *str); extern char *JsonEncodeDateTime(char *buf, Datum value, Oid typid, const int *tzp); extern bool to_json_is_immutable(Oid typoid); -extern Datum json_build_object_worker(int nargs, Datum *args, bool *nulls, - Oid *types, bool absent_on_null, +extern Datum json_build_object_worker(int nargs, const Datum *args, const bool *nulls, + const Oid *types, bool absent_on_null, bool unique_keys); -extern Datum json_build_array_worker(int nargs, Datum *args, bool *nulls, - Oid *types, bool absent_on_null); +extern Datum json_build_array_worker(int nargs, const Datum *args, const bool *nulls, + const Oid *types, bool absent_on_null); extern bool json_validate(text *json, bool check_unique_keys, bool throw_error); #endif /* JSON_H */ diff --git a/src/include/utils/jsonb.h b/src/include/utils/jsonb.h index 649a1644f24..e62a5f2f442 100644 --- a/src/include/utils/jsonb.h +++ b/src/include/utils/jsonb.h @@ -430,10 +430,10 @@ extern Datum jsonb_set_element(Jsonb *jb, Datum *path, int path_len, extern Datum jsonb_get_element(Jsonb *jb, Datum *path, int npath, bool *isnull, bool as_text); extern bool to_jsonb_is_immutable(Oid typoid); -extern Datum jsonb_build_object_worker(int nargs, Datum *args, bool *nulls, - Oid *types, bool absent_on_null, +extern Datum jsonb_build_object_worker(int nargs, const Datum *args, const bool *nulls, + const Oid *types, bool absent_on_null, bool unique_keys); -extern Datum jsonb_build_array_worker(int nargs, Datum *args, bool *nulls, - Oid *types, bool absent_on_null); +extern Datum jsonb_build_array_worker(int nargs, const Datum *args, const bool *nulls, + const Oid *types, bool absent_on_null); #endif /* __JSONB_H__ */ diff --git a/src/include/utils/tuplesort.h b/src/include/utils/tuplesort.h index 3f71c70f175..3a49a6d2d4d 100644 --- a/src/include/utils/tuplesort.h +++ b/src/include/utils/tuplesort.h @@ -437,7 +437,7 @@ extern void tuplesort_puttupleslot(Tuplesortstate *state, extern void tuplesort_putheaptuple(Tuplesortstate *state, HeapTuple tup); extern void tuplesort_putindextuplevalues(Tuplesortstate *state, Relation rel, ItemPointer self, - Datum *values, bool *isnull); + const Datum *values, const bool *isnull); extern void tuplesort_putdatum(Tuplesortstate *state, Datum val, bool isNull); diff --git a/src/include/utils/tuplestore.h b/src/include/utils/tuplestore.h index 36424b80b1b..1077c5fdeaa 100644 --- a/src/include/utils/tuplestore.h +++ b/src/include/utils/tuplestore.h @@ -54,7 +54,7 @@ extern void tuplestore_puttupleslot(Tuplestorestate *state, TupleTableSlot *slot); extern void tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple); extern void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc, - Datum *values, bool *isnull); + const Datum *values, const bool *isnull); /* Backwards compatibility macro */ #define tuplestore_donestoring(state) ((void) 0) |
