1997-04-02 05:23:38 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* sequence.h--
|
1997-09-07 07:04:48 +02:00
|
|
|
* prototypes for sequence.c.
|
1997-04-02 05:23:38 +02:00
|
|
|
*
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef SEQUENCE_H
|
|
|
|
#define SEQUENCE_H
|
|
|
|
|
1997-11-26 02:14:33 +01:00
|
|
|
#include "nodes/parsenodes.h"
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
/*
|
1997-04-02 05:23:38 +02:00
|
|
|
* Columns of a sequnece relation
|
|
|
|
*/
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define SEQ_COL_NAME 1
|
|
|
|
#define SEQ_COL_LASTVAL 2
|
|
|
|
#define SEQ_COL_INCBY 3
|
|
|
|
#define SEQ_COL_MAXVALUE 4
|
|
|
|
#define SEQ_COL_MINVALUE 5
|
|
|
|
#define SEQ_COL_CACHE 6
|
|
|
|
#define SEQ_COL_CYCLE 7
|
|
|
|
#define SEQ_COL_CALLED 8
|
1997-04-02 05:23:38 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define SEQ_COL_FIRSTCOL SEQ_COL_NAME
|
|
|
|
#define SEQ_COL_LASTCOL SEQ_COL_CALLED
|
1997-04-02 05:23:38 +02:00
|
|
|
|
1997-09-08 23:56:23 +02:00
|
|
|
extern void DefineSequence(CreateSeqStmt *stmt);
|
1997-09-08 04:41:22 +02:00
|
|
|
extern int4 nextval(struct varlena * seqname);
|
|
|
|
extern int4 currval(struct varlena * seqname);
|
1998-08-25 23:25:46 +02:00
|
|
|
extern int4 setval (struct varlena * seqname, int4 next);
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void CloseSequences(void);
|
1997-09-07 07:04:48 +02:00
|
|
|
|
|
|
|
#endif /* SEQUENCE_H */
|