Re: Remove unneeded cast in heap_xlog_lock.

Álvaro Herrera <alvherre@kurilemu.de>

From: Álvaro Herrera <alvherre@kurilemu.de>
To: Kirill Reshke <reshkekirill@gmail.com>
Cc: Richard Guo <guofenglinux@gmail.com>, Chao Li <li.evan.chao@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-22T09:59:31Z
Lists: pgsql-hackers
On 2025-Aug-22, Kirill Reshke wrote:

> I am uncertain about the delineation between when we make changes and
> when we refrain from doing so.

I think this is natural work after 9c727360bcc7, before which
BufferGetPage() was a macro and strangely enough had its own cast
embedded.  As I understand, the less casts we have, the better.  There's
some other standardization work going on to remove unnecessary casts
elsewhere, so I'm not sure why we wouldn't do this.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"El que vive para el futuro es un iluso, y el que vive para el pasado,
un imbécil" (Luis Adler, "Los tripulantes de la noche")



Commits

  1. Remove unneeded casts of BufferGetPage() result