|
PostgreSQL Source Code git master
|
#include "catalog/objectaddress.h"#include "fmgr.h"#include "nodes/parsenodes.h"#include "parser/parse_node.h"

Go to the source code of this file.
Data Structures | |
| struct | FormData_pg_sequence_data |
Macros | |
| #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 |
Typedefs | |
| typedef struct FormData_pg_sequence_data | FormData_pg_sequence_data |
| typedef FormData_pg_sequence_data * | Form_pg_sequence_data |
Functions | |
| int64 | nextval_internal (Oid relid, bool check_permissions) |
| Datum | nextval (PG_FUNCTION_ARGS) |
| List * | sequence_options (Oid relid) |
| ObjectAddress | DefineSequence (ParseState *pstate, CreateSeqStmt *seq) |
| ObjectAddress | AlterSequence (ParseState *pstate, AlterSeqStmt *stmt) |
| void | SequenceChangePersistence (Oid relid, char newrelpersistence) |
| void | DeleteSequenceTuple (Oid relid) |
| void | ResetSequence (Oid seq_relid) |
| void | SetSequence (Oid relid, int64 next, bool iscalled) |
| void | ResetSequenceCaches (void) |
| #define SEQ_COL_CALLED 3 |
Definition at line 36 of file sequence.h.
| #define SEQ_COL_FIRSTCOL SEQ_COL_LASTVAL |
Definition at line 38 of file sequence.h.
| #define SEQ_COL_LASTCOL SEQ_COL_CALLED |
Definition at line 39 of file sequence.h.
| #define SEQ_COL_LASTVAL 1 |
Definition at line 34 of file sequence.h.
| #define SEQ_COL_LOG 2 |
Definition at line 35 of file sequence.h.
Definition at line 28 of file sequence.h.
|
extern |
Definition at line 429 of file sequence.c.
References Assert, buf, SeqTableData::cached, CatalogTupleUpdate(), elog, ereport, errmsg(), ERROR, fb(), fill_seq_with_data(), GETSTRUCT(), GetTopTransactionId(), heap_copytuple(), HeapTupleIsValid, init_params(), init_sequence(), InvalidMultiXactId, InvalidObjectAddress, InvalidOid, InvalidTransactionId, InvokeObjectPostAlterHook, SeqTableData::last, NoLock, NOTICE, ObjectAddressSet, ObjectIdGetDatum(), process_owned_by(), RangeVarCallbackOwnsRelation(), RangeVarGetRelidExtended(), read_seq_tuple(), RelationNeedsWAL, RelationSetNewRelfilenumber(), RowExclusiveLock, RVR_MISSING_OK, SearchSysCacheCopy1, sequence_close(), ShareRowExclusiveLock, stmt, table_close(), table_open(), and UnlockReleaseBuffer().
Referenced by ProcessUtilitySlow().
|
extern |
Definition at line 112 of file sequence.c.
References AccessExclusiveLock, Assert, BoolGetDatum(), CatalogTupleInsert(), checkMembershipInCurrentExtension(), DefineRelation(), ereport, errcode(), errmsg(), fb(), fill_seq_with_data(), FormData_pg_sequence, heap_form_tuple(), heap_freetuple(), i, init_params(), Int64GetDatum(), Int64GetDatumFast, InvalidObjectAddress, InvalidOid, lappend(), makeColumnDef(), makeNode, NIL, NoLock, NOTICE, ObjectAddressSet, ObjectAddress::objectId, ObjectIdGetDatum(), OidIsValid, ONCOMMIT_NOOP, process_owned_by(), RangeVarGetAndCheckCreationNamespace(), RelationGetDescr, RowExclusiveLock, SEQ_COL_CALLED, SEQ_COL_FIRSTCOL, SEQ_COL_LASTCOL, SEQ_COL_LASTVAL, SEQ_COL_LOG, sequence_close(), sequence_open(), stmt, table_close(), table_open(), and value.
Referenced by ProcessUtilitySlow().
Definition at line 571 of file sequence.c.
References CatalogTupleDelete(), elog, ERROR, fb(), HeapTupleIsValid, ObjectIdGetDatum(), ReleaseSysCache(), RowExclusiveLock, SearchSysCache1(), HeapTupleData::t_self, table_close(), and table_open().
Referenced by doDeletion().
|
extern |
Definition at line 594 of file sequence.c.
References fb(), makeRangeVarFromNameList(), nextval_internal(), NoLock, PG_GETARG_TEXT_PP, PG_RETURN_INT64, RangeVarGetRelid, and textToQualifiedNameList().
Referenced by autoinc().
Definition at line 624 of file sequence.c.
References ACL_UPDATE, ACL_USAGE, ACLCHECK_OK, Assert, buf, BufferGetPage(), SeqTableData::cached, elog, END_CRIT_SECTION, ereport, errcode(), errmsg(), ERROR, fb(), GetRedoRecPtr(), GETSTRUCT(), GetTopTransactionId(), GetUserId(), HeapTupleIsValid, SeqTableData::increment, init_sequence(), SeqTableData::last, last_used_seq, SeqTableData::last_valid, MarkBufferDirty(), next, NoLock, ObjectIdGetDatum(), PageGetLSN(), PageSetLSN(), pg_class_aclcheck(), PreventCommandIfParallelMode(), PreventCommandIfReadOnly(), read_seq_tuple(), REGBUF_WILL_INIT, RelationGetRelationName, RelationNeedsWAL, ReleaseSysCache(), SeqTableData::relid, SearchSysCache1(), SEQ_LOG_VALS, sequence_close(), START_CRIT_SECTION, UnlockReleaseBuffer(), XLOG_SEQ_LOG, XLogBeginInsert(), XLogInsert(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by ExecEvalNextValueExpr(), nextval(), and nextval_oid().
Definition at line 255 of file sequence.c.
References Assert, buf, SeqTableData::cached, elog, ERROR, fb(), fill_seq_with_data(), GETSTRUCT(), heap_copytuple(), HeapTupleIsValid, init_sequence(), InvalidMultiXactId, InvalidTransactionId, SeqTableData::last, NoLock, ObjectIdGetDatum(), read_seq_tuple(), RelationSetNewRelfilenumber(), ReleaseSysCache(), SearchSysCache1(), sequence_close(), and UnlockReleaseBuffer().
Referenced by ExecuteTruncateGuts().
Definition at line 1905 of file sequence.c.
References fb(), hash_destroy(), last_used_seq, and seqhashtab.
Referenced by DiscardAll(), and DiscardCommand().
Definition at line 1712 of file sequence.c.
References elog, ERROR, fb(), GETSTRUCT(), HeapTupleIsValid, INT64_FORMAT, lappend(), makeBoolean(), makeDefElem(), makeFloat(), NIL, ObjectIdGetDatum(), psprintf(), ReleaseSysCache(), and SearchSysCache1().
Referenced by transformTableLikeClause().
Definition at line 542 of file sequence.c.
References AccessExclusiveLock, buf, fb(), fill_seq_with_data(), GetTopTransactionId(), init_sequence(), LockRelationOid(), NoLock, read_seq_tuple(), RelationNeedsWAL, RelationSetNewRelfilenumber(), sequence_close(), and UnlockReleaseBuffer().
Referenced by ATRewriteTables().
Definition at line 946 of file sequence.c.
References ACL_UPDATE, ACLCHECK_OK, buf, BufferGetPage(), SeqTableData::cached, elog, END_CRIT_SECTION, ereport, errcode(), errmsg(), ERROR, fb(), GETSTRUCT(), GetTopTransactionId(), GetUserId(), HeapTupleIsValid, init_sequence(), SeqTableData::last, SeqTableData::last_valid, MarkBufferDirty(), next, NoLock, ObjectIdGetDatum(), PageSetLSN(), pg_class_aclcheck(), PreventCommandIfParallelMode(), PreventCommandIfReadOnly(), read_seq_tuple(), REGBUF_WILL_INIT, RelationGetRelationName, RelationNeedsWAL, ReleaseSysCache(), SeqTableData::relid, SearchSysCache1(), sequence_close(), START_CRIT_SECTION, UnlockReleaseBuffer(), XLOG_SEQ_LOG, XLogBeginInsert(), XLogInsert(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by copy_sequence(), setval3_oid(), and setval_oid().