mirror of
https://github.com/postgres/postgres.git
synced 2026-02-27 11:50:33 -05:00
This change is a cocktail of harmonization of function argument names, grammar typos, renames for better consistency and unused code (see ltree). All of these have been spotted by the author. Author: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/b2c0d0b7-3944-487d-a03d-d155851958ff@gmail.com
53 lines
1.5 KiB
C
53 lines
1.5 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* sequence.h
|
|
* prototypes for sequence.c.
|
|
*
|
|
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* src/include/commands/sequence.h
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef SEQUENCE_H
|
|
#define SEQUENCE_H
|
|
|
|
#include "catalog/objectaddress.h"
|
|
#include "fmgr.h"
|
|
#include "nodes/parsenodes.h"
|
|
#include "parser/parse_node.h"
|
|
|
|
typedef struct FormData_pg_sequence_data
|
|
{
|
|
int64 last_value;
|
|
int64 log_cnt;
|
|
bool is_called;
|
|
} FormData_pg_sequence_data;
|
|
|
|
typedef FormData_pg_sequence_data *Form_pg_sequence_data;
|
|
|
|
/*
|
|
* Columns of a sequence relation
|
|
*/
|
|
|
|
#define SEQ_COL_LASTVAL 1
|
|
#define SEQ_COL_LOG 2
|
|
#define SEQ_COL_CALLED 3
|
|
|
|
#define SEQ_COL_FIRSTCOL SEQ_COL_LASTVAL
|
|
#define SEQ_COL_LASTCOL SEQ_COL_CALLED
|
|
|
|
extern int64 nextval_internal(Oid relid, bool check_permissions);
|
|
extern Datum nextval(PG_FUNCTION_ARGS);
|
|
extern List *sequence_options(Oid relid);
|
|
|
|
extern ObjectAddress DefineSequence(ParseState *pstate, CreateSeqStmt *seq);
|
|
extern ObjectAddress AlterSequence(ParseState *pstate, AlterSeqStmt *stmt);
|
|
extern void SequenceChangePersistence(Oid relid, char newrelpersistence);
|
|
extern void DeleteSequenceTuple(Oid relid);
|
|
extern void ResetSequence(Oid seq_relid);
|
|
extern void SetSequence(Oid relid, int64 next, bool iscalled);
|
|
extern void ResetSequenceCaches(void);
|
|
|
|
#endif /* SEQUENCE_H */
|