Mark ItemPointer parameters as const in tuple/table lock functions - Mailing list pgsql-hackers

From Chao Li
Subject Mark ItemPointer parameters as const in tuple/table lock functions
Date
Msg-id CAEoWx2m9e4rECHBwpRE4+GCH+pbYZXLh2f4rB1Du5hDfKug+Og@mail.gmail.com
Whole thread Raw
Responses Re: Mark ItemPointer parameters as const in tuple/table lock functions
List pgsql-hackers

Hi Hackers,

This is a pure refactor patch.

The functions LockTuple, ConditionalLockTuple, UnlockTuple, and XactLockTableWait take an ItemPointer parameter named 'tid'. Since these functions do not modify the tuple identifier, the parameter should be declared as const to better convey intent and allow the compiler to enforce immutability.

With this patch, build still passes, and "make check" also passes.

Best regards,

--

Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
Attachment

pgsql-hackers by date:

Previous
From: Mihail Nikalayeu
Date:
Subject: Re: [BUG?] check_exclusion_or_unique_constraint false negative
Next
From: Peter Eisentraut
Date:
Subject: Re: Mark ItemPointer parameters as const in tuple/table lock functions