1
/*-------------------------------------------------------------------------
4
* prototypes for sequence.c.
6
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
7
* Portions Copyright (c) 1994, Regents of the University of California
9
* src/include/commands/sequence.h
11
*-------------------------------------------------------------------------
16
#include "nodes/parsenodes.h"
17
#include "storage/relfilenode.h"
18
#include "access/xlog.h"
22
typedef struct FormData_pg_sequence
24
NameData sequence_name;
34
} FormData_pg_sequence;
36
typedef FormData_pg_sequence *Form_pg_sequence;
39
* Columns of a sequence relation
42
#define SEQ_COL_NAME 1
43
#define SEQ_COL_LASTVAL 2
44
#define SEQ_COL_STARTVAL 3
45
#define SEQ_COL_INCBY 4
46
#define SEQ_COL_MAXVALUE 5
47
#define SEQ_COL_MINVALUE 6
48
#define SEQ_COL_CACHE 7
50
#define SEQ_COL_CYCLE 9
51
#define SEQ_COL_CALLED 10
53
#define SEQ_COL_FIRSTCOL SEQ_COL_NAME
54
#define SEQ_COL_LASTCOL SEQ_COL_CALLED
57
#define XLOG_SEQ_LOG 0x00
59
typedef struct xl_seq_rec
62
/* SEQUENCE TUPLE DATA FOLLOWS AT THE END */
65
extern Datum nextval(PG_FUNCTION_ARGS);
66
extern Datum nextval_oid(PG_FUNCTION_ARGS);
67
extern Datum currval_oid(PG_FUNCTION_ARGS);
68
extern Datum setval_oid(PG_FUNCTION_ARGS);
69
extern Datum setval3_oid(PG_FUNCTION_ARGS);
70
extern Datum lastval(PG_FUNCTION_ARGS);
72
extern Datum pg_sequence_parameters(PG_FUNCTION_ARGS);
74
extern void DefineSequence(CreateSeqStmt *stmt);
75
extern void AlterSequence(AlterSeqStmt *stmt);
76
extern void ResetSequence(Oid seq_relid);
78
extern void seq_redo(XLogRecPtr lsn, XLogRecord *rptr);
79
extern void seq_desc(StringInfo buf, uint8 xl_info, char *rec);
81
#endif /* SEQUENCE_H */