diff options
| author | Peter Eisentraut <peter@eisentraut.org> | 2025-10-30 14:10:39 +0100 |
|---|---|---|
| committer | Peter Eisentraut <peter@eisentraut.org> | 2025-10-30 14:12:06 +0100 |
| commit | e1ac846f3d2836dcfa0ad15310e28d0a0b495500 (patch) | |
| tree | 5f05b8bf3fc955335ae27c37c64037eda9f8bac9 /src/backend/utils | |
| parent | a27c40bfe8ab1834c45d657844df3a84cbb292ac (diff) | |
Mark ItemPointer arguments as const throughout
This is a follow up 991295f. I searched over src/ and made all
ItemPointer arguments as const as much as possible.
Note: We cut out from the original patch the pieces that would have
created incompatibilities in the index or table AM APIs. Those could
be considered separately.
Author: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAEoWx2nBaypg16Z5ciHuKw66pk850RFWw9ACS2DqqJ_AkKeRsw%40mail.gmail.com
Diffstat (limited to 'src/backend/utils')
| -rw-r--r-- | src/backend/utils/adt/tid.c | 6 | ||||
| -rw-r--r-- | src/backend/utils/sort/tuplesortvariants.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/adt/tid.c b/src/backend/utils/adt/tid.c index 39dab3e42df..0cfb0bd3735 100644 --- a/src/backend/utils/adt/tid.c +++ b/src/backend/utils/adt/tid.c @@ -42,7 +42,7 @@ #define DELIM ',' #define NTIDARGS 2 -static ItemPointer currtid_for_view(Relation viewrel, ItemPointer tid); +static ItemPointer currtid_for_view(Relation viewrel, const ItemPointerData *tid); /* ---------------------------------------------------------------- * tidin @@ -293,7 +293,7 @@ hashtidextended(PG_FUNCTION_ARGS) * relation "rel". */ static ItemPointer -currtid_internal(Relation rel, ItemPointer tid) +currtid_internal(Relation rel, const ItemPointerData *tid) { ItemPointer result; AclResult aclresult; @@ -335,7 +335,7 @@ currtid_internal(Relation rel, ItemPointer tid) * correspond to the CTID of a base relation. */ static ItemPointer -currtid_for_view(Relation viewrel, ItemPointer tid) +currtid_for_view(Relation viewrel, const ItemPointerData *tid) { TupleDesc att = RelationGetDescr(viewrel); RuleLock *rulelock; diff --git a/src/backend/utils/sort/tuplesortvariants.c b/src/backend/utils/sort/tuplesortvariants.c index 890cdbe1204..41ac4afbf49 100644 --- a/src/backend/utils/sort/tuplesortvariants.c +++ b/src/backend/utils/sort/tuplesortvariants.c @@ -816,7 +816,7 @@ tuplesort_putheaptuple(Tuplesortstate *state, HeapTuple tup) */ void tuplesort_putindextuplevalues(Tuplesortstate *state, Relation rel, - ItemPointer self, const Datum *values, + const ItemPointerData *self, const Datum *values, const bool *isnull) { SortTuple stup; |
