1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-18 02:02:55 +03:00

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
This commit is contained in:
Peter Eisentraut
2025-10-30 14:10:39 +01:00
parent a27c40bfe8
commit e1ac846f3d
25 changed files with 64 additions and 64 deletions

View File

@@ -168,7 +168,7 @@
* PredicateLockRelation(Relation relation, Snapshot snapshot)
* PredicateLockPage(Relation relation, BlockNumber blkno,
* Snapshot snapshot)
* PredicateLockTID(Relation relation, ItemPointer tid, Snapshot snapshot,
* PredicateLockTID(Relation relation, const ItemPointerData *tid, Snapshot snapshot,
* TransactionId tuple_xid)
* PredicateLockPageSplit(Relation relation, BlockNumber oldblkno,
* BlockNumber newblkno)
@@ -180,7 +180,7 @@
* conflict detection (may also trigger rollback)
* CheckForSerializableConflictOut(Relation relation, TransactionId xid,
* Snapshot snapshot)
* CheckForSerializableConflictIn(Relation relation, ItemPointer tid,
* CheckForSerializableConflictIn(Relation relation, const ItemPointerData *tid,
* BlockNumber blkno)
* CheckTableForSerializableConflictIn(Relation relation)
*
@@ -2618,7 +2618,7 @@ PredicateLockPage(Relation relation, BlockNumber blkno, Snapshot snapshot)
* Skip if this is a temporary table.
*/
void
PredicateLockTID(Relation relation, ItemPointer tid, Snapshot snapshot,
PredicateLockTID(Relation relation, const ItemPointerData *tid, Snapshot snapshot,
TransactionId tuple_xid)
{
PREDICATELOCKTARGETTAG tag;
@@ -4333,7 +4333,7 @@ CheckTargetForConflictsIn(PREDICATELOCKTARGETTAG *targettag)
* tuple itself.
*/
void
CheckForSerializableConflictIn(Relation relation, ItemPointer tid, BlockNumber blkno)
CheckForSerializableConflictIn(Relation relation, const ItemPointerData *tid, BlockNumber blkno)
{
PREDICATELOCKTARGETTAG targettag;