45#include "utils/fmgroids.h"
46#include "utils/fmgrprotos.h"
55#define GETNEWOID_LOG_THRESHOLD 1000000
56#define GETNEWOID_LOG_MAX_INTERVAL 128000000
281 return (
name[0] ==
'p' &&
504 (
errmsg(
"still searching for an unused OID in relation \"%s\"",
506 errdetail_plural(
"OID candidates have been checked %" PRIu64 " time, but no unused OID has been found yet.",
507 "OID candidates have been checked %" PRIu64 " times, but no unused OID has been found yet.",
532 "new OID has been assigned in relation \"%s\" after %" PRIu64 " retries",
571 switch (relpersistence)
581 elog(
ERROR,
"invalid relpersistence: %c", relpersistence);
662 errmsg(
"must be superuser to call %s()",
671 errmsg(
"pg_nextoid() can only be used on system catalogs")));
676 errmsg(
"index \"%s\" does not belong to table \"%s\"",
684 errmsg(
"column \"%s\" of relation \"%s\" does not exist",
693 errmsg(
"column \"%s\" is not of type oid",
697 idx->rd_index->indkey.values[0] != attno)
700 errmsg(
"index \"%s\" is not the index for column \"%s\"",
729 errmsg(
"must be superuser to call %s()",
730 "pg_stop_making_pinned_objects")));
Datum idx(PG_FUNCTION_ARGS)
#define Assert(condition)
bool IsToastRelation(Relation relation)
#define GETNEWOID_LOG_THRESHOLD
bool IsToastNamespace(Oid namespaceId)
bool IsSystemRelation(Relation relation)
Oid GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
RelFileNumber GetNewRelFileNumber(Oid reltablespace, Relation pg_class, char relpersistence)
bool IsCatalogNamespace(Oid namespaceId)
bool IsToastClass(Form_pg_class reltuple)
bool IsCatalogRelation(Relation relation)
bool IsPinnedObject(Oid classId, Oid objectId)
bool IsSharedRelation(Oid relationId)
bool IsCatalogRelationOid(Oid relid)
bool IsInplaceUpdateRelation(Relation relation)
bool IsReservedName(const char *name)
#define GETNEWOID_LOG_MAX_INTERVAL
Datum pg_nextoid(PG_FUNCTION_ARGS)
bool IsInplaceUpdateOid(Oid relid)
bool IsCatalogTextUniqueIndexOid(Oid relid)
bool IsSystemClass(Oid relid, Form_pg_class reltuple)
Datum pg_stop_making_pinned_objects(PG_FUNCTION_ARGS)
int errmsg_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...)
int errdetail_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define PG_GETARG_NAME(n)
void systable_endscan(SysScanDesc sysscan)
HeapTuple systable_getnext(SysScanDesc sysscan)
SysScanDesc systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
void index_close(Relation relation, LOCKMODE lockmode)
Relation index_open(Oid relationId, LOCKMODE lockmode)
#define IsBootstrapProcessingMode()
#define CHECK_FOR_INTERRUPTS()
bool isTempToastNamespace(Oid namespaceId)
FormData_pg_attribute * Form_pg_attribute
FormData_pg_class * Form_pg_class
static Datum ObjectIdGetDatum(Oid X)
#define INVALID_PROC_NUMBER
#define ProcNumberForTempRelations()
#define RelationGetRelid(relation)
#define RelationGetRelationName(relation)
#define RelationGetNamespace(relation)
#define IndexRelationGetNumberOfKeyAttributes(relation)
#define relpath(rlocator, forknum)
#define InvalidRelFileNumber
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
#define BTEqualStrategyNumber
char str[REL_PATH_STR_MAXLEN+1]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCacheAttName(Oid relid, const char *attname)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
#define FirstUnpinnedObjectId
void StopGeneratingPinnedObjectIds(void)