diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2023-10-10 07:50:15 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2023-10-10 07:50:43 +0200 |
commit | 1d91d24d9a831be0bb90ec71934f735c52456c57 (patch) | |
tree | 47c9ba51a493bb78cf6695fdf815ea15d2ca24f5 /src/backend/access/common/indextuple.c | |
parent | fc4089f3c65a5f1b413a3299ba02b66a8e5e37d0 (diff) | |
download | postgresql-1d91d24d9a831be0bb90ec71934f735c52456c57.tar.gz postgresql-1d91d24d9a831be0bb90ec71934f735c52456c57.zip |
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/backend/access/common/indextuple.c')
-rw-r--r-- | src/backend/access/common/indextuple.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c index 8b178f94c17..9e9f87b134e 100644 --- a/src/backend/access/common/indextuple.c +++ b/src/backend/access/common/indextuple.c @@ -42,8 +42,8 @@ */ IndexTuple index_form_tuple(TupleDesc tupleDescriptor, - Datum *values, - bool *isnull) + const Datum *values, + const bool *isnull) { return index_form_tuple_context(tupleDescriptor, values, isnull, CurrentMemoryContext); @@ -63,8 +63,8 @@ index_form_tuple(TupleDesc tupleDescriptor, */ IndexTuple index_form_tuple_context(TupleDesc tupleDescriptor, - Datum *values, - bool *isnull, + const Datum *values, + const bool *isnull, MemoryContext context) { char *tp; /* tuple pointer */ @@ -79,8 +79,8 @@ index_form_tuple_context(TupleDesc tupleDescriptor, int numberOfAttributes = tupleDescriptor->natts; #ifdef TOAST_INDEX_HACK - Datum untoasted_values[INDEX_MAX_KEYS]; - bool untoasted_free[INDEX_MAX_KEYS]; + Datum untoasted_values[INDEX_MAX_KEYS] = {0}; + bool untoasted_free[INDEX_MAX_KEYS] = {0}; #endif if (numberOfAttributes > INDEX_MAX_KEYS) |