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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user