1
/*-------------------------------------------------------------------------
4
* Relation descriptor cache definitions.
7
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
8
* Portions Copyright (c) 1994, Regents of the University of California
10
* $PostgreSQL: pgsql/src/include/utils/relcache.h,v 1.48 2005-01-10 20:02:24 tgl Exp $
12
*-------------------------------------------------------------------------
17
#include "utils/rel.h"
20
* relation lookup routines
22
extern Relation RelationIdGetRelation(Oid relationId);
23
extern Relation RelationSysNameGetRelation(const char *relationName);
25
/* finds an existing cache entry, but won't make a new one */
26
extern Relation RelationIdCacheGetRelation(Oid relationId);
28
extern void RelationClose(Relation relation);
31
* Routines to compute/retrieve additional cached information
33
extern List *RelationGetIndexList(Relation relation);
34
extern List *RelationGetIndexExpressions(Relation relation);
35
extern List *RelationGetIndexPredicate(Relation relation);
37
extern void RelationSetIndexList(Relation relation, List *indexIds);
39
extern void RelationInitIndexAccessInfo(Relation relation);
42
* Routines for backend startup
44
extern void RelationCacheInitialize(void);
45
extern void RelationCacheInitializePhase2(void);
46
extern void RelationCacheInitializePhase3(void);
49
* Routine to create a relcache entry for an about-to-be-created relation
51
extern Relation RelationBuildLocalRelation(const char *relname,
60
* Routines for flushing/rebuilding relcache entries in various scenarios
62
extern void RelationForgetRelation(Oid rid);
64
extern void RelationCacheInvalidateEntry(Oid relationId);
66
extern void RelationCacheInvalidate(void);
68
extern void AtEOXact_RelationCache(bool isCommit);
69
extern void AtEOSubXact_RelationCache(bool isCommit, SubTransactionId mySubid,
70
SubTransactionId parentSubid);
73
* Routines to help manage rebuilding of relcache init file
75
extern bool RelationIdIsInInitFile(Oid relationId);
76
extern void RelationCacheInitFileInvalidate(bool beforeSend);
78
/* should be used only by relcache.c and catcache.c */
79
extern bool criticalRelcachesBuilt;
81
#endif /* RELCACHE_H */