Eneboo - Documentación para desarrolladores
|
00001 /*------------------------------------------------------------------------- 00002 * 00003 * syscache.h 00004 * System catalog cache definitions. 00005 * 00006 * See also lsyscache.h, which provides convenience routines for 00007 * common cache-lookup operations. 00008 * 00009 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group 00010 * Portions Copyright (c) 1994, Regents of the University of California 00011 * 00012 * $PostgreSQL: pgsql/src/include/utils/syscache.h,v 1.61 2005/10/15 02:49:46 momjian Exp $ 00013 * 00014 *------------------------------------------------------------------------- 00015 */ 00016 #ifndef SYSCACHE_H 00017 #define SYSCACHE_H 00018 00019 #include "access/htup.h" 00020 00021 /* 00022 * Declarations for util/syscache.c. 00023 * 00024 * SysCache identifiers. 00025 * 00026 * The order of these must match the order 00027 * they are entered into the structure cacheinfo[] in syscache.c. 00028 * Keep them in alphabetical order. 00029 */ 00030 00031 #define AGGFNOID 0 00032 #define AMNAME 1 00033 #define AMOID 2 00034 #define AMOPOPID 3 00035 #define AMOPSTRATEGY 4 00036 #define AMPROCNUM 5 00037 #define ATTNAME 6 00038 #define ATTNUM 7 00039 #define AUTHMEMMEMROLE 8 00040 #define AUTHMEMROLEMEM 9 00041 #define AUTHNAME 10 00042 #define AUTHOID 11 00043 #define CASTSOURCETARGET 12 00044 #define CLAAMNAMENSP 13 00045 #define CLAOID 14 00046 #define CONDEFAULT 15 00047 #define CONNAMENSP 16 00048 #define CONOID 17 00049 #define INDEXRELID 18 00050 #define INHRELID 19 00051 #define LANGNAME 20 00052 #define LANGOID 21 00053 #define NAMESPACENAME 22 00054 #define NAMESPACEOID 23 00055 #define OPERNAMENSP 24 00056 #define OPEROID 25 00057 #define PROCNAMEARGSNSP 26 00058 #define PROCOID 27 00059 #define RELNAMENSP 28 00060 #define RELOID 29 00061 #define RULERELNAME 30 00062 #define STATRELATT 31 00063 #define TYPENAMENSP 32 00064 #define TYPEOID 33 00065 00066 extern void InitCatalogCache(void); 00067 extern void InitCatalogCachePhase2(void); 00068 00069 extern HeapTuple SearchSysCache(int cacheId, 00070 Datum key1, Datum key2, Datum key3, Datum key4); 00071 extern void ReleaseSysCache(HeapTuple tuple); 00072 00073 /* convenience routines */ 00074 extern HeapTuple SearchSysCacheCopy(int cacheId, 00075 Datum key1, Datum key2, Datum key3, Datum key4); 00076 extern bool SearchSysCacheExists(int cacheId, 00077 Datum key1, Datum key2, Datum key3, Datum key4); 00078 extern Oid GetSysCacheOid(int cacheId, 00079 Datum key1, Datum key2, Datum key3, Datum key4); 00080 00081 extern HeapTuple SearchSysCacheAttName(Oid relid, const char *attname); 00082 extern HeapTuple SearchSysCacheCopyAttName(Oid relid, const char *attname); 00083 extern bool SearchSysCacheExistsAttName(Oid relid, const char *attname); 00084 00085 extern Datum SysCacheGetAttr(int cacheId, HeapTuple tup, 00086 AttrNumber attributeNumber, bool *isNull); 00087 00088 /* list-search interface. Users of this must import catcache.h too */ 00089 extern struct catclist *SearchSysCacheList(int cacheId, int nkeys, 00090 Datum key1, Datum key2, Datum key3, Datum key4); 00091 00092 #define ReleaseSysCacheList(x) ReleaseCatCacheList(x) 00093 00094 #endif /* SYSCACHE_H */