Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcdaeff9

Browse files
committed
XLogRegisterData, XLogRegisterBufData void * argument for binary data
Change XLogRegisterData() and XLogRegisterBufData() functions to takevoid * for binary data instead of char *. This will remove the needfor 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
1 parent773c51d commitcdaeff9

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

‎src/backend/access/transam/README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,13 +586,13 @@ void XLogRegisterBuffer(uint8 block_id, Buffer buf, uint8 flags);
586586
XLogRegisterBufData() is included in the WAL record even if a full-page
587587
image is taken.
588588

589-
void XLogRegisterData(constchar *data, int len);
589+
void XLogRegisterData(constvoid *data, int len);
590590

591591
XLogRegisterData is used to include arbitrary data in the WAL record. If
592592
XLogRegisterData() is called multiple times, the data are appended, and
593593
will be made available to the redo routine as one contiguous chunk.
594594

595-
void XLogRegisterBufData(uint8 block_id, constchar *data, int len);
595+
void XLogRegisterBufData(uint8 block_id, constvoid *data, int len);
596596

597597
XLogRegisterBufData is used to include data associated with a particular
598598
buffer that was registered earlier with XLogRegisterBuffer(). If

‎src/backend/access/transam/xloginsert.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ XLogRegisterBlock(uint8 block_id, RelFileLocator *rlocator, ForkNumber forknum,
361361
* XLogRecGetData().
362362
*/
363363
void
364-
XLogRegisterData(constchar*data,uint32len)
364+
XLogRegisterData(constvoid*data,uint32len)
365365
{
366366
XLogRecData*rdata;
367367

@@ -402,7 +402,7 @@ XLogRegisterData(const char *data, uint32 len)
402402
* limited)
403403
*/
404404
void
405-
XLogRegisterBufData(uint8block_id,constchar*data,uint32len)
405+
XLogRegisterBufData(uint8block_id,constvoid*data,uint32len)
406406
{
407407
registered_buffer*regbuf;
408408
XLogRecData*rdata;

‎src/include/access/xlog_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ typedef struct xl_end_of_recovery
312312
typedefstructXLogRecData
313313
{
314314
structXLogRecData*next;/* next struct in chain, or NULL */
315-
constchar*data;/* start of rmgr data to include */
315+
constvoid*data;/* start of rmgr data to include */
316316
uint32len;/* length of rmgr data to include */
317317
}XLogRecData;
318318

‎src/include/access/xloginsert.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ extern void XLogBeginInsert(void);
4545
externvoidXLogSetRecordFlags(uint8flags);
4646
externXLogRecPtrXLogInsert(RmgrIdrmid,uint8info);
4747
externvoidXLogEnsureRecordSpace(intmax_block_id,intndatas);
48-
externvoidXLogRegisterData(constchar*data,uint32len);
48+
externvoidXLogRegisterData(constvoid*data,uint32len);
4949
externvoidXLogRegisterBuffer(uint8block_id,Bufferbuffer,uint8flags);
5050
externvoidXLogRegisterBlock(uint8block_id,RelFileLocator*rlocator,
5151
ForkNumberforknum,BlockNumberblknum,constPageData*page,
5252
uint8flags);
53-
externvoidXLogRegisterBufData(uint8block_id,constchar*data,uint32len);
53+
externvoidXLogRegisterBufData(uint8block_id,constvoid*data,uint32len);
5454
externvoidXLogResetInsertion(void);
5555
externboolXLogCheckBufferNeedsBackup(Bufferbuffer);
5656

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp