From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Mark ItemPointer arguments as const in tuple/table lock function |
Date: | 2025-08-29 05:41:29 |
Message-ID: | E1urrrd-002BUk-0m@gemulon.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Mark ItemPointer arguments as const in tuple/table lock functions
The functions LockTuple, ConditionalLockTuple, UnlockTuple, and
XactLockTableWait take an ItemPointer argument that they do not
modify, so the argument can be const-qualified to better convey intent
and allow the compiler to enforce immutability.
Author: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/CAEoWx2m9e4rECHBwpRE4%2BGCH%2BpbYZXLh2f4rB1Du5hDfKug%2BOg%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/991295f387a6a453fe061831bcc36294989fe77b
Modified Files
--------------
src/backend/storage/lmgr/lmgr.c | 10 +++++-----
src/include/storage/lmgr.h | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2025-08-29 07:25:32 | pgsql: headerscheck: Ignore Windows-specific header |
Previous Message | Peter Eisentraut | 2025-08-29 05:22:14 | pgsql: Remove unneeded casts of BufferGetPage() result |