From 1d91d24d9a831be0bb90ec71934f735c52456c57 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 10 Oct 2023 07:50:15 +0200 Subject: Add const to values and nulls arguments This excludes any changes that would change the external AM APIs. Reviewed-by: Aleksander Alekseev Discussion: https://www.postgresql.org/message-id/flat/14c31f4a-0347-0805-dce8-93a9072c05a5%40eisentraut.org --- src/backend/executor/execIndexing.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/backend/executor/execIndexing.c') diff --git a/src/backend/executor/execIndexing.c b/src/backend/executor/execIndexing.c index 1d82b64b897..3c6730632de 100644 --- a/src/backend/executor/execIndexing.c +++ b/src/backend/executor/execIndexing.c @@ -127,15 +127,15 @@ typedef enum static bool check_exclusion_or_unique_constraint(Relation heap, Relation index, IndexInfo *indexInfo, ItemPointer tupleid, - Datum *values, bool *isnull, + const Datum *values, const bool *isnull, EState *estate, bool newIndex, CEOUC_WAIT_MODE waitMode, bool violationOK, ItemPointer conflictTid); -static bool index_recheck_constraint(Relation index, Oid *constr_procs, - Datum *existing_values, bool *existing_isnull, - Datum *new_values); +static bool index_recheck_constraint(Relation index, const Oid *constr_procs, + const Datum *existing_values, const bool *existing_isnull, + const Datum *new_values); static bool index_unchanged_by_update(ResultRelInfo *resultRelInfo, EState *estate, IndexInfo *indexInfo, Relation indexRelation); @@ -684,7 +684,7 @@ static bool check_exclusion_or_unique_constraint(Relation heap, Relation index, IndexInfo *indexInfo, ItemPointer tupleid, - Datum *values, bool *isnull, + const Datum *values, const bool *isnull, EState *estate, bool newIndex, CEOUC_WAIT_MODE waitMode, bool violationOK, @@ -910,7 +910,7 @@ void check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo, ItemPointer tupleid, - Datum *values, bool *isnull, + const Datum *values, const bool *isnull, EState *estate, bool newIndex) { (void) check_exclusion_or_unique_constraint(heap, index, indexInfo, tupleid, @@ -924,9 +924,9 @@ check_exclusion_constraint(Relation heap, Relation index, * exclusion condition against the new_values. Returns true if conflict. */ static bool -index_recheck_constraint(Relation index, Oid *constr_procs, - Datum *existing_values, bool *existing_isnull, - Datum *new_values) +index_recheck_constraint(Relation index, const Oid *constr_procs, + const Datum *existing_values, const bool *existing_isnull, + const Datum *new_values) { int indnkeyatts = IndexRelationGetNumberOfKeyAttributes(index); int i; -- cgit v1.2.3