mirror of
https://github.com/postgres/postgres.git
synced 2025-11-21 00:42:43 +03:00
XLogRegisterData, XLogRegisterBufData void * argument for binary data
Change XLogRegisterData() and XLogRegisterBufData() functions to take void * for binary data instead of char *. This will remove the need for numerous casts (done in a separate commit for clarity). Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Discussion: https://www.postgresql.org/message-id/flat/fd1fcedb-3492-4fc8-9e3e-74b97f2db6c7%40eisentraut.org
This commit is contained in:
@@ -586,13 +586,13 @@ void XLogRegisterBuffer(uint8 block_id, Buffer buf, uint8 flags);
|
||||
XLogRegisterBufData() is included in the WAL record even if a full-page
|
||||
image is taken.
|
||||
|
||||
void XLogRegisterData(const char *data, int len);
|
||||
void XLogRegisterData(const void *data, int len);
|
||||
|
||||
XLogRegisterData is used to include arbitrary data in the WAL record. If
|
||||
XLogRegisterData() is called multiple times, the data are appended, and
|
||||
will be made available to the redo routine as one contiguous chunk.
|
||||
|
||||
void XLogRegisterBufData(uint8 block_id, const char *data, int len);
|
||||
void XLogRegisterBufData(uint8 block_id, const void *data, int len);
|
||||
|
||||
XLogRegisterBufData is used to include data associated with a particular
|
||||
buffer that was registered earlier with XLogRegisterBuffer(). If
|
||||
|
||||
@@ -361,7 +361,7 @@ XLogRegisterBlock(uint8 block_id, RelFileLocator *rlocator, ForkNumber forknum,
|
||||
* XLogRecGetData().
|
||||
*/
|
||||
void
|
||||
XLogRegisterData(const char *data, uint32 len)
|
||||
XLogRegisterData(const void *data, uint32 len)
|
||||
{
|
||||
XLogRecData *rdata;
|
||||
|
||||
@@ -402,7 +402,7 @@ XLogRegisterData(const char *data, uint32 len)
|
||||
* limited)
|
||||
*/
|
||||
void
|
||||
XLogRegisterBufData(uint8 block_id, const char *data, uint32 len)
|
||||
XLogRegisterBufData(uint8 block_id, const void *data, uint32 len)
|
||||
{
|
||||
registered_buffer *regbuf;
|
||||
XLogRecData *rdata;
|
||||
|
||||
Reference in New Issue
Block a user