PostgreSQL Source Code git master
Loading...
Searching...
No Matches
seqdesc.c File Reference
#include "postgres.h"
#include "commands/sequence_xlog.h"
Include dependency graph for seqdesc.c:

Go to the source code of this file.

Functions

void seq_desc (StringInfo buf, XLogReaderState *record)
 
const charseq_identify (uint8 info)
 

Function Documentation

◆ seq_desc()

void seq_desc ( StringInfo  buf,
XLogReaderState record 
)

Definition at line 21 of file seqdesc.c.

22{
23 char *rec = XLogRecGetData(record);
24 uint8 info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
25 xl_seq_rec *xlrec = (xl_seq_rec *) rec;
26
27 if (info == XLOG_SEQ_LOG)
28 appendStringInfo(buf, "rel %u/%u/%u",
29 xlrec->locator.spcOid, xlrec->locator.dbOid,
30 xlrec->locator.relNumber);
31}
uint8_t uint8
Definition c.h:544
static char buf[DEFAULT_XLOG_SEG_SIZE]
static int fb(int x)
#define XLOG_SEQ_LOG
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition stringinfo.c:145
#define XLogRecGetInfo(decoder)
Definition xlogreader.h:409
#define XLogRecGetData(decoder)
Definition xlogreader.h:414

References appendStringInfo(), buf, fb(), XLOG_SEQ_LOG, XLogRecGetData, and XLogRecGetInfo.

◆ seq_identify()

const char * seq_identify ( uint8  info)

Definition at line 34 of file seqdesc.c.

35{
36 const char *id = NULL;
37
38 switch (info & ~XLR_INFO_MASK)
39 {
40 case XLOG_SEQ_LOG:
41 id = "LOG";
42 break;
43 }
44
45 return id;
46}
#define XLR_INFO_MASK
Definition xlogrecord.h:62

References fb(), XLOG_SEQ_LOG, and XLR_INFO_MASK.