24#include "catalog/pg_db_role_setting_d.h"
25#include "catalog/pg_depend_d.h"
26#include "catalog/pg_description_d.h"
27#include "catalog/pg_seclabel_d.h"
28#include "catalog/pg_shdepend_d.h"
29#include "catalog/pg_shdescription_d.h"
30#include "catalog/pg_shseclabel_d.h"
79#define KEY(...) VA_ARGS_NARGS(__VA_ARGS__), { __VA_ARGS__ }
81#include "catalog/syscache_info.h"
84 "SysCacheSize does not match syscache.c's array");
135 elog(
ERROR,
"could not initialize cache %u (%d)",
606 elog(
ERROR,
"invalid cache ID: %d", cacheId);
636 "unexpected null value in cached tuple for catalog %s column %s",
662 elog(
ERROR,
"invalid cache ID: %d", cacheId);
675 elog(
ERROR,
"invalid cache ID: %d", cacheId);
693 elog(
ERROR,
"invalid cache ID: %d", cacheId);
744 int middle = low + (high - low) / 2;
769 int middle = low + (high - low) / 2;
#define Assert(condition)
#define StaticAssertDecl(condition, errmessage)
#define OidIsValid(objectId)
CatCache * InitCatCache(int id, Oid reloid, Oid indexoid, int nkeys, const int *key, int nbuckets)
HeapTuple SearchCatCache2(CatCache *cache, Datum v1, Datum v2)
HeapTuple SearchCatCache3(CatCache *cache, Datum v1, Datum v2, Datum v3)
void InitCatCachePhase2(CatCache *cache, bool touch_index)
CatCList * SearchCatCacheList(CatCache *cache, int nkeys, Datum v1, Datum v2, Datum v3)
uint32 GetCatCacheHashValue(CatCache *cache, Datum v1, Datum v2, Datum v3, Datum v4)
HeapTuple SearchCatCache4(CatCache *cache, Datum v1, Datum v2, Datum v3, Datum v4)
void CatCacheInvalidate(CatCache *cache, uint32 hashValue)
HeapTuple SearchCatCache1(CatCache *cache, Datum v1)
void ReleaseCatCache(HeapTuple tuple)
HeapTuple SearchCatCache(CatCache *cache, Datum v1, Datum v2, Datum v3, Datum v4)
HeapTuple heap_copytuple(HeapTuple tuple)
#define HeapTupleIsValid(tuple)
static Datum heap_getattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
static void * GETSTRUCT(const HeapTupleData *tuple)
static int pg_cmp_u32(uint32 a, uint32 b)
void AcceptInvalidationMessages(void)
bool ItemPointerEquals(const ItemPointerData *pointer1, const ItemPointerData *pointer2)
static void ItemPointerSetInvalid(ItemPointerData *pointer)
static OffsetNumber ItemPointerGetOffsetNumber(const ItemPointerData *pointer)
static BlockNumber ItemPointerGetBlockNumber(const ItemPointerData *pointer)
static bool ItemPointerIsValid(const ItemPointerData *pointer)
LockAcquireResult LockAcquire(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock, bool dontWait)
bool LockRelease(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock)
#define SET_LOCKTAG_TUPLE(locktag, dboid, reloid, blocknum, offnum)
#define InplaceUpdateTupleLock
char * get_rel_name(Oid relid)
FormData_pg_attribute * Form_pg_attribute
#define qsort(a, b, c, d)
static Oid DatumGetObjectId(Datum X)
static Datum Int16GetDatum(int16 X)
static Datum ObjectIdGetDatum(Oid X)
static Datum CStringGetDatum(const char *X)
static size_t qunique(void *array, size_t elements, size_t width, int(*compare)(const void *, const void *))
Oid GetSysCacheOid(SysCacheIdentifier cacheId, AttrNumber oidcol, Datum key1, Datum key2, Datum key3, Datum key4)
HeapTuple SearchSysCacheCopyAttName(Oid relid, const char *attname)
bool RelationHasSysCache(Oid relid)
HeapTuple SearchSysCacheCopyAttNum(Oid relid, int16 attnum)
void InitCatalogCache(void)
HeapTuple SearchSysCacheLockedCopy1(SysCacheIdentifier cacheId, Datum key1)
void ReleaseSysCache(HeapTuple tuple)
static bool CacheInitialized
HeapTuple SearchSysCache2(SysCacheIdentifier cacheId, Datum key1, Datum key2)
static int oid_compare(const void *a, const void *b)
uint32 GetSysCacheHashValue(SysCacheIdentifier cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
static int SysCacheSupportingRelOidSize
HeapTuple SearchSysCacheAttNum(Oid relid, int16 attnum)
bool RelationSupportsSysCache(Oid relid)
HeapTuple SearchSysCacheCopy(SysCacheIdentifier cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
bool SearchSysCacheExistsAttName(Oid relid, const char *attname)
HeapTuple SearchSysCacheLocked1(SysCacheIdentifier cacheId, Datum key1)
HeapTuple SearchSysCache(SysCacheIdentifier cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
HeapTuple SearchSysCache3(SysCacheIdentifier cacheId, Datum key1, Datum key2, Datum key3)
void InitCatalogCachePhase2(void)
HeapTuple SearchSysCacheAttName(Oid relid, const char *attname)
void SysCacheInvalidate(SysCacheIdentifier cacheId, uint32 hashValue)
static Oid SysCacheRelationOid[SysCacheSize]
bool SearchSysCacheExists(SysCacheIdentifier cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
static CatCache * SysCache[SysCacheSize]
static Oid SysCacheSupportingRelOid[SysCacheSize *2]
static int SysCacheRelationOidSize
Datum SysCacheGetAttrNotNull(SysCacheIdentifier cacheId, HeapTuple tup, AttrNumber attributeNumber)
bool RelationInvalidatesSnapshotsOnly(Oid relid)
struct catclist * SearchSysCacheList(SysCacheIdentifier cacheId, int nkeys, Datum key1, Datum key2, Datum key3)
HeapTuple SearchSysCache4(SysCacheIdentifier cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
HeapTuple SearchSysCache1(SysCacheIdentifier cacheId, Datum key1)
Datum SysCacheGetAttr(SysCacheIdentifier cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)