Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef RELCACHE_H
00015 #define RELCACHE_H
00016
00017 #include "access/tupdesc.h"
00018 #include "nodes/bitmapset.h"
00019
00020
00021 typedef struct RelationData *Relation;
00022
00023
00024
00025
00026
00027
00028
00029 typedef Relation *RelationPtr;
00030
00031
00032
00033
00034 extern Relation RelationIdGetRelation(Oid relationId);
00035 extern void RelationClose(Relation relation);
00036
00037
00038
00039
00040 extern List *RelationGetIndexList(Relation relation);
00041 extern Oid RelationGetOidIndex(Relation relation);
00042 extern List *RelationGetIndexExpressions(Relation relation);
00043 extern List *RelationGetIndexPredicate(Relation relation);
00044 extern Bitmapset *RelationGetIndexAttrBitmap(Relation relation, bool keyAttrs);
00045 extern void RelationGetExclusionInfo(Relation indexRelation,
00046 Oid **operators,
00047 Oid **procs,
00048 uint16 **strategies);
00049
00050 extern void RelationSetIndexList(Relation relation,
00051 List *indexIds, Oid oidIndex);
00052
00053 extern void RelationInitIndexAccessInfo(Relation relation);
00054
00055
00056
00057
00058 extern int errtable(Relation rel);
00059 extern int errtablecol(Relation rel, int attnum);
00060 extern int errtablecolname(Relation rel, const char *colname);
00061 extern int errtableconstraint(Relation rel, const char *conname);
00062
00063
00064
00065
00066 extern void RelationCacheInitialize(void);
00067 extern void RelationCacheInitializePhase2(void);
00068 extern void RelationCacheInitializePhase3(void);
00069
00070
00071
00072
00073 extern Relation RelationBuildLocalRelation(const char *relname,
00074 Oid relnamespace,
00075 TupleDesc tupDesc,
00076 Oid relid,
00077 Oid relfilenode,
00078 Oid reltablespace,
00079 bool shared_relation,
00080 bool mapped_relation,
00081 char relpersistence,
00082 char relkind);
00083
00084
00085
00086
00087 extern void RelationSetNewRelfilenode(Relation relation,
00088 TransactionId freezeXid, MultiXactId minmulti);
00089
00090
00091
00092
00093 extern void RelationForgetRelation(Oid rid);
00094
00095 extern void RelationCacheInvalidateEntry(Oid relationId);
00096
00097 extern void RelationCacheInvalidate(void);
00098
00099 extern void RelationCloseSmgrByOid(Oid relationId);
00100
00101 extern void AtEOXact_RelationCache(bool isCommit);
00102 extern void AtEOSubXact_RelationCache(bool isCommit, SubTransactionId mySubid,
00103 SubTransactionId parentSubid);
00104
00105
00106
00107
00108 extern bool RelationIdIsInInitFile(Oid relationId);
00109 extern void RelationCacheInitFilePreInvalidate(void);
00110 extern void RelationCacheInitFilePostInvalidate(void);
00111 extern void RelationCacheInitFileRemove(void);
00112
00113
00114 extern bool criticalRelcachesBuilt;
00115
00116
00117 extern bool criticalSharedRelcachesBuilt;
00118
00119 #endif