Header And Logo

PostgreSQL
| The world's most advanced open source database.

Functions

clogdesc.c File Reference

#include "postgres.h"
#include "access/clog.h"
Include dependency graph for clogdesc.c:

Go to the source code of this file.

Functions

void clog_desc (StringInfo buf, uint8 xl_info, char *rec)

Function Documentation

void clog_desc ( StringInfo  buf,
uint8  xl_info,
char *  rec 
)

Definition at line 21 of file clogdesc.c.

References appendStringInfo(), CLOG_TRUNCATE, and CLOG_ZEROPAGE.

{
    uint8       info = xl_info & ~XLR_INFO_MASK;

    if (info == CLOG_ZEROPAGE)
    {
        int         pageno;

        memcpy(&pageno, rec, sizeof(int));
        appendStringInfo(buf, "zeropage: %d", pageno);
    }
    else if (info == CLOG_TRUNCATE)
    {
        int         pageno;

        memcpy(&pageno, rec, sizeof(int));
        appendStringInfo(buf, "truncate before: %d", pageno);
    }
    else
        appendStringInfo(buf, "UNKNOWN");
}