summaryrefslogtreecommitdiff
path: root/src/include/access/heaptoast.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-10-31 10:45:02 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-10-31 10:47:25 +0100
commit8a27d418f8fc08b62f371c1b167efbfbf0a2a24e (patch)
tree414b7c6d0f4813aadb4b80f41774131180fe867e /src/include/access/heaptoast.h
parentaa4535307e3d432f44b4c76b8ffebc5a0789250c (diff)
Mark function arguments of type "Datum *" as "const Datum *" where possible
Several functions in the codebase accept "Datum *" parameters but do not modify the pointed-to data. These have been updated to take "const Datum *" instead, improving type safety and making the interfaces clearer about their intent. This change helps the compiler catch accidental modifications and better documents immutability of arguments. Most of "Datum *" parameters have a pairing "bool *isnull" parameter, they are constified as well. No functional behavior is changed by this patch. Author: Chao Li <lic@highgo.com> Discussion: https://www.postgresql.org/message-id/flat/CAEoWx2msfT0knvzUa72ZBwu9LR_RLY4on85w2a9YpE-o2By5HQ@mail.gmail.com
Diffstat (limited to 'src/include/access/heaptoast.h')
-rw-r--r--src/include/access/heaptoast.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/access/heaptoast.h b/src/include/access/heaptoast.h
index 6385a27caf8..1c68f8107d6 100644
--- a/src/include/access/heaptoast.h
+++ b/src/include/access/heaptoast.h
@@ -133,8 +133,8 @@ extern Datum toast_flatten_tuple_to_datum(HeapTupleHeader tup,
* ----------
*/
extern HeapTuple toast_build_flattened_tuple(TupleDesc tupleDesc,
- Datum *values,
- bool *isnull);
+ const Datum *values,
+ const bool *isnull);
/* ----------
* heap_fetch_toast_slice