Add const qualifiers to XLogRegister*() functions

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Aleksander Alekseev <aleksander@timescale.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-08-28T08:09:27Z
Lists: pgsql-hackers

Attachments

On 04.10.23 16:37, Peter Eisentraut wrote:
> On 03.10.23 13:28, Aleksander Alekseev wrote:
>> While examining the code for similar places I noticed that the
>> following functions can also be const'ified:

>> - XLogRegisterData (?)
> 
> I don't think this would work, at least without further work elsewhere, 
> because the data is stored in XLogRecData, which has no const handling.

I got around to fixing this.  Here is a patch.  It allows removing a few 
unconstify() calls, which is nice.

Commits

  1. Add const qualifiers to XLogRegister*() functions

  2. Constify crc32_sz

  3. Modernize const handling with readline