~ubuntu-branches/debian/sid/postgresql-9.3/sid

« back to all changes in this revision

Viewing changes to src/backend/access/rmgrdesc/seqdesc.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-05-08 05:39:52 UTC
  • Revision ID: package-import@ubuntu.com-20130508053952-1j7uilp7mjtrvq8q
Tags: upstream-9.3~beta1
ImportĀ upstreamĀ versionĀ 9.3~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * seqdesc.c
 
4
 *    rmgr descriptor routines for commands/sequence.c
 
5
 *
 
6
 * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
 
7
 * Portions Copyright (c) 1994, Regents of the University of California
 
8
 *
 
9
 *
 
10
 * IDENTIFICATION
 
11
 *    src/backend/access/rmgrdesc/seqdesc.c
 
12
 *
 
13
 *-------------------------------------------------------------------------
 
14
 */
 
15
#include "postgres.h"
 
16
 
 
17
#include "commands/sequence.h"
 
18
 
 
19
 
 
20
void
 
21
seq_desc(StringInfo buf, uint8 xl_info, char *rec)
 
22
{
 
23
        uint8           info = xl_info & ~XLR_INFO_MASK;
 
24
        xl_seq_rec *xlrec = (xl_seq_rec *) rec;
 
25
 
 
26
        if (info == XLOG_SEQ_LOG)
 
27
                appendStringInfo(buf, "log: ");
 
28
        else
 
29
        {
 
30
                appendStringInfo(buf, "UNKNOWN");
 
31
                return;
 
32
        }
 
33
 
 
34
        appendStringInfo(buf, "rel %u/%u/%u",
 
35
                           xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode);
 
36
}