Eneboo - Documentación para desarrolladores
|
00001 /*------------------------------------------------------------------------- 00002 * 00003 * relcache.h 00004 * Relation descriptor cache definitions. 00005 * 00006 * 00007 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group 00008 * Portions Copyright (c) 1994, Regents of the University of California 00009 * 00010 * $PostgreSQL: pgsql/src/include/utils/relcache.h,v 1.52 2005/10/15 02:49:46 momjian Exp $ 00011 * 00012 *------------------------------------------------------------------------- 00013 */ 00014 #ifndef RELCACHE_H 00015 #define RELCACHE_H 00016 00017 #include "utils/rel.h" 00018 00019 /* 00020 * relation lookup routines 00021 */ 00022 extern Relation RelationIdGetRelation(Oid relationId); 00023 00024 /* finds an existing cache entry, but won't make a new one */ 00025 extern Relation RelationIdCacheGetRelation(Oid relationId); 00026 00027 extern void RelationClose(Relation relation); 00028 00029 /* 00030 * Routines to compute/retrieve additional cached information 00031 */ 00032 extern List *RelationGetIndexList(Relation relation); 00033 extern Oid RelationGetOidIndex(Relation relation); 00034 extern List *RelationGetIndexExpressions(Relation relation); 00035 extern List *RelationGetIndexPredicate(Relation relation); 00036 00037 extern void RelationSetIndexList(Relation relation, 00038 List *indexIds, Oid oidIndex); 00039 00040 extern void RelationInitIndexAccessInfo(Relation relation); 00041 00042 /* 00043 * Routines for backend startup 00044 */ 00045 extern void RelationCacheInitialize(void); 00046 extern void RelationCacheInitializePhase2(void); 00047 extern void RelationCacheInitializePhase3(void); 00048 00049 /* 00050 * Routine to create a relcache entry for an about-to-be-created relation 00051 */ 00052 extern Relation RelationBuildLocalRelation(const char *relname, 00053 Oid relnamespace, 00054 TupleDesc tupDesc, 00055 Oid relid, 00056 Oid reltablespace, 00057 bool shared_relation); 00058 00059 /* 00060 * Routines for flushing/rebuilding relcache entries in various scenarios 00061 */ 00062 extern void RelationForgetRelation(Oid rid); 00063 00064 extern void RelationCacheInvalidateEntry(Oid relationId); 00065 00066 extern void RelationCacheInvalidate(void); 00067 00068 extern void AtEOXact_RelationCache(bool isCommit); 00069 extern void AtEOSubXact_RelationCache(bool isCommit, SubTransactionId mySubid, 00070 SubTransactionId parentSubid); 00071 00072 /* 00073 * Routines to help manage rebuilding of relcache init file 00074 */ 00075 extern bool RelationIdIsInInitFile(Oid relationId); 00076 extern void RelationCacheInitFileInvalidate(bool beforeSend); 00077 00078 /* should be used only by relcache.c and catcache.c */ 00079 extern bool criticalRelcachesBuilt; 00080 00081 #endif /* RELCACHE_H */